After solving the case sensitivity issue, separating the alternations, and
solving the un-escaped /, here is what we are left with.

(p(ost)?[.\s]*o(ffice)?[.\s]*box)
po(b|x|drawer|stoffice|[ ]bx|box)
p[\/]o
b(x|ox|uzon)
a(partado|ptdo)

Which matches:
(p(ost)?.*o(ffice)?.*box)

post(anynumberofanythingexceptnewline)office(anynumberofanythingexceptnewlin
e)box
p(anynumberofanythingexceptnewline)office(anynumberofanythingexceptnewline)b
ox
post(anynumberofanythingexceptnewline)o(anynumberofanythingexceptnewline)box
p(anynumberofanythingexceptnewline)o(anynumberofanythingexceptnewline)box


po(b|x|drawer|stoffice|[ ]bx|box)

pob
pox
podrawer
postoffice
po bx
pobox


p[\/]o

p/o


b(x|ox|uzon)

bx
box
buzon


a(partado|ptdo)
apartado
aptdo


I can't imagine what the original specs were, but it looks like a patch job
gone awry.

Steve


-----Original Message-----
From: Uri Guttman [mailto:[EMAIL PROTECTED]
Sent: Monday, January 07, 2008 5:06 PM
To: Fun with Perl
Subject: regex of the month (decade?)



^([Pp]([Oo][Ss][Tt])?[.\s]*[Oo]([Ff][Ff][Ii][Cc][Ee])?[.\s]*[Bb][Oo]
[Xx])|[Pp][Oo]([Bb]|[Xx]|[Dd][Rr][Aa][Ww][Ee][Rr]|[Ss][Tt][Oo][Ff][Ff]
[Ii][Cc][Ee]|[ ][Bb][Xx]|[Bb][Oo][Xx])|[Pp][/][Oo]|[Bb]([Xx]|[Oo][Xx]|
[Uu][Zz][Oo][Nn])|[Aa]([Pp][Aa][Rr][Tt][Aa][Dd][Oo]|[Pp][Tt][Dd][Oo])


the challenge: itemize the stupidities. the case issue is only 1! i
don't want to even post the 'spec' unless asked for it. i saw this on
usenet today.

enjoy!!

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  --------
http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and
Coding-
Search or Offer Perl Jobs  ----------------------------
http://jobs.perl.org

Reply via email to