Sublime Forum

Regex: Select all the words that start with re and are followed by the comma

#1

hello. I have more words like so:

reburn, america, adagio, excalibur, lambada, return, home..

Can anyone help me with a regex that selects the words that start with re and are followed by the comma, like reburn, or return, ?

0 Likes

#2

\w*\b(RE)\w+,

0 Likes

#3

but that regex won’t only find words that start with re

0 Likes

#4

\<re\w+ will work, but \bre\w+ is probably sufficient (the first is assuming boost regex).

1 Like