regex - Java - Regular expression question -


I am new to regular expressions

Actually I can say " / * "I want to use regex to search for something surrounded by. And " * / " and replace it with "".

An example where a simple regular expression fails:

  Body {font-family: "/ * this is not a comment * /"; }  

But if you do not care about these matters, you can go with it:

  str.replaceAll ("/ \\ * . *? \\ * / "," ");  

This match starts with / * and then looks for the next * / , between the middle Some characters as possible (. *? *? /?>)


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -