In an older episode (Wednesday, 21. January 2009), 
rje...@vzw.blackberry.net wrote:
> I am attempting to create a regular expression to give a negative
> score for purchase orders. I need to match the following: PO
> PO:
> PO#
> P.O.
> P.O. #
> PO #
>
> I have not been able to get this to work correctly. I have the
> following:
>
> /\bP\.?O\.?[:#]? [#]?/i

/\bP\.?O\.?[:#]? ?[#]?/i should work:
$ echo 'PO#'|perl -pe 's/\bP\.?O\.?[:#]? ?[#]?/blah/i'
blah

> Thanks in advance.

My pleasure.

wolfgang

Reply via email to