Re-opening this old thread with a very very similar question.
I'm using the below regex to match just the (\w+), not the whole line. I'm doing this with a (?:...) as described in the documentation as a "not captured group" but I've also tried the previously mentioned (?=...) as well with similar failures.
- Code: Select all
<dict>
<key>match</key>
<string>(?:object network) (\w+)</string>
<key>name</key>
<string>keyword.network.object.cisco</string>
</dict>
The above code matches the entire line below:
- Code: Select all
object network myInsideNetwork
How can I apply the keyword.network.object.cisco style to just the (\w+) and not the whole line?