PERL Regex to find specific string NOT ending with a period -



PERL Regex to find specific string NOT ending with a period -

for reason, having brain block. cannot figure out how match specific strings not end in period. take next text:

this has br string , br br has period: br.

i want match br strings not br strings end in period (br.)

please help. know easy - maybe different in perl regex not familiar enough.

you can utilize regex:

\bbr(?!\.)

(?!\.) negative lookahead create sure br not followed dot.

regex demo

regex perl

Comments

Popular posts from this blog

Php operator `break` doesn't stop while -

ubuntu - Bash Script to Check That Files Are Being Created -

vim: Search & replace -