Easy way to convert regex to a java compatible regex?

后端 未结 4 2082
花落未央
花落未央 2021-01-01 21:30

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

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 22:11

    Personally I use within Eclipse the EXCELLENT plugins from the site http://www.bastian-bergerhoff.com/eclipse/features/
    You will find there QuickREx for regular expression and also XPath developper plugin that I use a lot.
    For QuickREx, just test you regular expression and press the button to copy it on your active editor with the good escapes characters.
    It's a must, just give it a try.

提交回复
热议问题