Easy way to convert regex to a java compatible regex?
- by beagleguy
hi all I have a regex defined in python/ruby/php that is like this
"(forumdisplay.php\?.*page=%CURRENTPAGE%)"
when I do it for java, I have to double escape that question mark to //?
like so:
"(forumdisplay.php\\?.*page=%CURRENTPAGE%)";
is there a function I can use to do that automatically? or would I need to change all my regexes over to work with the java regex engine?
thanks