alexin
December 26th, 2008, 09:34 AM
I'm naively using the following regular expression to match Javadoc comments:
Regular Expression
/\*(.*)\*/
Input Example
/**
* Javadoc comment
*/
Unfortunately, the expression doesn't match, probably due to the multiline input sequence - it works when the input is on a single line. Shoudn't the dot metacharacter match \r and \n?
I have used similar expressions, for other purposes, that work fine with multiple lines.
I'm clueless since several days. Any suggestion is welcome! Thanks.
Regular Expression
/\*(.*)\*/
Input Example
/**
* Javadoc comment
*/
Unfortunately, the expression doesn't match, probably due to the multiline input sequence - it works when the input is on a single line. Shoudn't the dot metacharacter match \r and \n?
I have used similar expressions, for other purposes, that work fine with multiple lines.
I'm clueless since several days. Any suggestion is welcome! Thanks.