DigitalAce7
DigitalAce7

Reputation: 123

Find and Replace using RegEx in SublimeText but just add formating

Using sublime text to find a model number in sublime text. I can find the regular expression but I want to add some formatting to what it finds. For Example, a model number may be

J627TS4

but then I want to do a find and replace and make it into.

<a href="#" class="popup">J627TS4</a>

Is this possible in SublimeText. I have to add it to 300+ models on a chart and I am looking for an easier way. Thanks!

Upvotes: 0

Views: 176

Answers (1)

Stephan
Stephan

Reputation: 43013

Try this:

Find:

([A-Z]\d{3}[A-Z]{2}\d)

Replace

<a href="#" class="popup">$1</a>

Upvotes: 1

Related Questions