regex - How to find (* comments *) using Java's regexp? -
I do not know how to work with '(', ')' and '*' which may be in the comment is . Comments are multiline.
This is a simple pattern to handle:
\ (\ * (*. *)) * * * Example:
You may also want to set a single-row flag, (? S ) \ (\ * (* *.) \ * \) Note that these cases are not a code such as (* in the string, or other Strange combination. Your best bet is to use parses, for example, which is ready ().
Comments
Post a Comment