Use Sublime Text find to highlight a regex group in search pattern

regexsublime-texttext-editors

Is there a way to make Sublime Text highlight (match) only part of a regex search pattern?

For example, I want to exclusively highlight Text when searching for Some(Text).

Best Answer

Difficulty in getting a regex application to work will probably have a regex solution. In this case, lookarounds.

Example using a lookbehind:

  • Sample:

    SomeText
    
  • Regex:

    (?<=Some)(Text)
    
  • Match:

    Text
    
Related Question