Reading the section regular expressions in EmacsWiki appears this:
You can use a tool to construct regexps. For example, you can use ‘rx’ like this: (rx (or (and "\*" (*? anything) "*/") (and "//" (*? anything) eol))) To produce this regexp (which matches C-style multiline and single line comments): \\*\\(?:.\\|\n\\)*?\\*/\\|//\\(?:.\\|\n\\)*?$
I get the
or will match either C-style multiline or C/C++ single line comments.
But I do not get the
I am not sure how
anythingworks and am assuming that will match any char.
It might be something equivalent to
.*. Is it?
If I got it right,
*?is the non-greedy variant of
Which really confuses me... The smallest possible match for
Why the C-style multi-line opening is shown as "\*"? I suspect it is a typo on EmacsWiki and it should be "/*".