I am trying to write a custom syntax definition for SublimeText 2. I made the regex and tested it (using SublimeText2's regex find), and the regex works for what i want it to, however, once I put it into the .tmLanguage file I get the following error:
Error in regex: undefined group option in regex
Here is the regex:
\b([Aa]|[Tt]he|[Aa]n)\b(?(?![ (),'.a-zA-Z]*\b([Aa]|[Tt]he|[Aa]n)\b)([ (),a-zA-Z]*[0-9]{2,3})|(,,,))
And here is my XML .tmLanguage file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>techpaper</string>
</array>
<key>name</key>
<string>Tech Paper</string>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b([Aa]|[Tt]he|[Aa]n)\b(?(?![ (),'.a-zA-Z]*\b([Aa]|[Tt]he|[Aa]n)\b)([ (),a-zA-Z]*[0-9]{2,3})|(,,,))</string>
<key>name</key>
<string>string.list.element</string>
</dict>
</array>
<key>scopeName</key>
<string>source.techPaper</string>
<key>uuid</key>
<string>092f2f93-b3ad-461d-9ca2-978b1c2bb7ad</string>
</dict>
</plist>
Thanks in advance for your help!