[squeak-dev] Help with Regex
Casimiro de Almeida Barreto
casimiro.barreto at gmail.com
Mon Jun 7 16:48:03 UTC 2010
Hello,
I'm facing the following problem: I have to extract patterns from a
variable length expression. The form of the expression in itself is very
simple:
'20 31 64 33 99 12 32 11 44 16 ... 99 41'
Meaning I've sequences of two digits separated by spaces. I just want to
extract it using a "one pass regex".
| rgx |
rgx := RxMatcher forString: '...'
But it seems that VBRegex has no recursion... If I want to have
something like:
rgx subexpression: 2 -> 20
rgx subexpression: 3 -> 31
...
rgx subexpression: n -> 41
what's the simplest way of doing that in one pass?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100607/7622f7c2/signature.pgp
More information about the Squeak-dev
mailing list
|