So for example if you have string like '12312377' then $1 will be 7.m/^(?:(\d+)|::)*\1$/x #which means the same as: m/^ (\d+)* #capture digits from the beginning of string \1 #than match the same digit as $1 in the end #and the backtracking (in reverse order) ends happily #where $1 is the digit before the last one $/;
In reply to Re: Regular Expressions
by sh1tn
in thread Regular Expressions
by y8
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |