tags:

views:

29

answers:

1
+2  Q: 

ICU regex quoting

I am wondering if there is a way to quote a string in the ICU (c++) library. There exists "\Q" + string + "\E" but I am having generated input come in as the string provided. There does not seem to be any ICU quote regex method. Would just changing all "\E" in string to \\E work.

A: 

I'd file a feature request with your use case. I don't think there's currently a function to do this.

Steven R. Loomis