P
Philippe Aymer
Hi all,
I'm looking at a PERL regex (if possible) that will be able to use a
repetition quantifier metachar, but the number of repetition is
unknown until runtime.
For example:
X3xyz...
the number 3 give me the number of "repetition" for the next chars
(length of string), something like:
/X(\d)(\w{\1})/
but \1 is not possible within {} the repetition quantifier.
Is there a way to use {} with the repetition number only known from
the regex ?
Thanks,
Phil.
I'm looking at a PERL regex (if possible) that will be able to use a
repetition quantifier metachar, but the number of repetition is
unknown until runtime.
For example:
X3xyz...
the number 3 give me the number of "repetition" for the next chars
(length of string), something like:
/X(\d)(\w{\1})/
but \1 is not possible within {} the repetition quantifier.
Is there a way to use {} with the repetition number only known from
the regex ?
Thanks,
Phil.