Read about the \b word boundary regular expression metacharacter in perlre.
/J\
In reply to Re: Match Whole Word by gellyfish in thread Match Whole Word by habibrahman_h