Help with regular expression syntax

I suppose my real problem is that I always want to understand everything that's going on, down to the last detail.

I'm reading the ReSharper docs about creating patterns for to-do items. For the regular expression, it refers to the java.util.regex docs. But then the example regex is: (\W|^)(?MyItem)(\W|$)(.*) I read all the regex docs I could find (including the Java one), but I couldn't find anything that would explain what (?]]>...) means. Are there any docs out there that explain this pattern?

3 comments

I saw the same reference to the java docs, but that appears to be outdated or just plain wrong. That syntax is consistent with .NET regex syntax, and somewhere in the JIRA site I saw a comment from JetBrainz that it does in fact use the .NET syntax. (Ah, here it is: http://www.jetbrains.net/jira/browse/RSRP-64945)

That being said, I can't get regular expressions to work at all for to-do items. I've submitted a bug which can be found here: http://www.jetbrains.net/jira/browse/RSRP-81611

0

?]]> is simply a named group. Its used to do "sub-capture" in a regex that can be referenced later, either through application code (like, from C# after the regex has run), or within the regex via a back-reference.

0

Yes, I figured that was the case just yesterday when I was reading the .NET regular expression syntax. (For the record, it's here: http://msdn.microsoft.com/en-us/library/hs600312.aspx).

0

Please sign in to leave a comment.