http://www.perlmonks.org?node_id=782624


in reply to Word find and replace with bold

The \b sequence is used in regular expressions to find the boundary between "word characters" and "non-word characters". That's often useful to mark the beginning and end of a word.

if (/\b$some_regex\b) { ... }

But Word documents aren't plain text files. So I don't know how well plain text regexes will work.

--

See the Copyright notice on my home node.

Perl training courses