[TriLUG] A curious regular expression
Shawn William Taylor
STaylor at torexretailna.com
Sun Apr 8 19:03:46 EDT 2007
Nope, I think that ".%*@*#&" gets it!!
I can't say I have known Jim since '97. I can say however, whenever I am
in a pinch, he always seems to have a crowbar.
Shawn
Aaron wrote:
Forgive me for latching onto a rather curious portion of your message,
but that REGEX is a most unusual one.it's syntactically valid (your
brackets match, your braces contain an actual numerical range
representation, etc), so I have to think you spent a moment constructing
it, but it's very unlikely to match a sensible string?
Potential matches include:
.#&%
*#&%
.@#&%
*@@#&%
or any combination of the leading . and * followed by 0 to 99 @'s, then
followed by the string #&$. I suppose it could be used to indicate a
Bugs Bunny style expletive of up to 103 chars in length, with increasing
lengths involving just padding the @'s, possibly found in the middle of
some other text?
A more general and flexible regex might be something like
/[.*#&%]{,99}/, unless in your experience they always start with . or *,
for some reason? I'd also include ! and $ in the list of potential
character matches commonly found in cartoon expletives.
Or, is there some more subtle intended implication I'm overlooking,
here? :)
Aaron S. Joyner
More information about the TriLUG
mailing list