case insensitive flag not working with replaceAll
Tyler
sprizzer at gmail.com
Thu Jan 2 07:11:53 PST 2014
Hi, I'm having issues with the case insensitive flag from the
phobos regex library (2.064). I have the following line of code
which returns a string. Consider the following inputs...
fileLine = "policy PRI-GROUPJ-EXPORT"
redTerm = "groupj"
auto newString = replaceAll!(replaceTerm)(fileLine,
regex(redTerm, "gi"));
The code will not match the redTerm "groupj", even though I have
the case insensitive flag "i" set. If the redTerm text is
"GROUPJ", it will match and return the correctly modified string.
Am I using this incorrectly?
More information about the Digitalmars-d
mailing list