Adam’s Post(erous)

@adammarkey: But there's no sense crying over every mistake. You just keep on trying till you run out of cake.

« Back to blog

Just broke a personal record for regular expression length

Need to document this for sure!

This regex: [a-zA-Z:._]*\s*=\s*"[ 0-9a-zA-Z\+-/*_[mod]]*"|[a-zA-Z:._]*\s*=\s*[0-9a-zA-Z\+-/*_[mod]]*|=

This regex with parse attributes from the string below:

band=header alignment="2" text="Last Updated Date"border="6" color="0" x="1518" y="12" height="56" width="425"  hidesnaked=1  font.face="Arial" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120"

to:

band=header
alignment="2"
text="Last Updated Date"
etc...

Oct 22, 2009
Brandy said...
what the heck

:)

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    twitter