Perl prxmatch difference between space and word boundary \b

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 95
Accepted Solution

Perl prxmatch difference between space and word boundary \b

hi,

 

Can someone explain if/what is the difference in perl,using function  prxmatch, between space and word boundary \b?

 

Example adding a space (after POBOX):

if prxmatch ("m/POBOX /oi",BILL_ADDR_LINE1)> 0 

 

Example adding word boundary \b :

if prxmatch ("m/POBOX\b/oi",BILL_ADDR_LINE1)> 0

 

Thank you 


Accepted Solutions
Solution
‎07-25-2017 08:57 AM
Super User
Posts: 10,023

Re: Perl prxmatch difference between space and word boundary \b

The first one only match "POBOX ".

But the second one will match "POBOX " or "POBOX," or "POBOX."  .................

View solution in original post


All Replies
Solution
‎07-25-2017 08:57 AM
Super User
Posts: 10,023

Re: Perl prxmatch difference between space and word boundary \b

The first one only match "POBOX ".

But the second one will match "POBOX " or "POBOX," or "POBOX."  .................

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 81 views
  • 0 likes
  • 2 in conversation