/** * SOMETHING BLABLABLA * Date: 3/16/14 * Time: 8:29 PM */ I want to match anything from /** to */
I can match /** to the first * with this:
/\*\*([^\*]*)\* But I don't know how to unmatch both last two letters.
You can use:
/(?:^\s*\/\*\*)(.*)(?:^\s*\*\/)/ms Or Debuggex version:

By 'unmatch' I think you mean have a group that is not included in the match group. You use a non capturing group that starts with (?:regex) to do that.
The full explanation is:
/(?:^\s*\/\*\*)(.*)(?:\s*\*\/)/ms (?:^\s*\/\*\*) Non-capturing group ^ assert position at start of a line \s* match any white space character [\r\n\t\f ] Quantifier: Between zero and unlimited times, as many times as possible, giving back as needed [greedy] \/ matches the character / literally \* matches the character * literally \* matches the character * literally 1st Capturing group (.*) .* matches any character Quantifier: Between zero and unlimited times, as many times as possible, giving back as needed [greedy] (?:\s*\*\/) Non-capturing group \s* match any white space character [\r\n\t\f ] Quantifier: Between zero and unlimited times, as many times as possible, giving back as needed [greedy] \* matches the character * literally \/ matches the character / literally m modifier: multi-line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string) s modifier: single line. Dot matches newline characters If you want to match:
/** * SOMETHING BLABLABLA * Date: 3/16/14 * Time: 8:29 PM*/ ^ comment terminator Just remove the anchor in the final non capturing group to be (?:\s*\*\/)
For Sublime, you need the flags ms to be set. Use:
(?ms)(?:^\s*\/\*\*)(.*)(?:^\s*\*\/) ^^^^ This part sets the flags for Boost regex engine... (?:^\s*\/\*\*)(.*)(?:^\s*\*\/)Try this, which requires dot-matches-all:
/\*\*.*?\*/ Alternatively, this captures all post-asterisk text on each line...sort of:
/\*\*(?:\s+\* ([^\r\n]+))+\s+\*/ 
Actually it only captures the last line, but it does seem closer.
/(\/\*\*.*?\*\/)/m
(?=\*\/). I suspect not, though, given that you are already capturing the first/*