I'm looking for a regex expression that will highlight all words in a text document that contain a letter at a specific position that I specify in the expression.
Any help would be appreciated, thanks!
I'm looking for a regex expression that will highlight all words in a text document that contain a letter at a specific position that I specify in the expression.
Any help would be appreciated, thanks!
You can use:
\b\w{A}B\w*\b
where A is the the position - 1 where you want the character to appear, and B is the character you want.
for example if you want to highlight all the words that have the "x" character in the 3 position the you would use \b\w{2}x\w*\b
(2 because the desired position is 3 so 3 - 1 = 2
)
check this regex101 to see it working and play with it