Hello!
I'd like to do the following:
Given just one line of text, match every occurrence of a
double letter
and push those double letters on my_stack. Say, if we are
given
$line = "This line contains some occurrences of double
letters,
hoorray";
then I want my_stack to end up containing "cc",
"rr", "tt", "oo",
"rr";
Everything I tried so far just put the first occurrence of
double
letters (in this example, "cc") on the stack,
even if I used the /g
option for my match. I suppose the regex engine matched
every
occurrence, but somehow it didnt "halt" and
"care to push" every single
one of the on my_stack.
So... how should I go about the above problem?
Many thanks for your help!! Dominic
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|