Am 10.06.2005 um 19:32 schrieb 2702NET:
Hi All,
Sorry for the slightly OT posting.
Don't have much experience in the way of Regular Expressions and
not finding anything obvious in PregEx Xtra documentation, my books
or on the web. Wondering if one of you folks might be able to point
me in the right direction.
What is the Regular Expression for matching a particular number of
any repeated character - each of the same character repeats spaced
by any other, wild character?
What I'm looking for:
Say we're looking for 10 repeats of the same (of any) character
(the repeated character being the first in the string) each of the
character repeats "spaced" by any character. The RegExp might return:
that should be:
(A.){10}
match 10 times the literal "A" and any other char (.)
"A&A&A.A.A:A:A:ABA(A(A("
(A is the repeating character)
or
"%^%^%^%*%l%>%>%>%>%%"
(% is the repeating character)#
(%.){10}
or
"$%$%$%$%$%$%$%$%$%$0"
($ is the repeating character)
(\$.){10}
the $ must be escaped
---------------------------
|||
a�ex
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]