We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Backreferences To Failed Groups
Backreferences To Failed Groups
Sort by
recency
|
172 Discussions
|
Please Login in order to post a comment
This is what i used: ^\d{2}(\-?)\d{2}\1\d{2}\1\d{2}$
r"\d{8}|^(\d\d)(-\d\d){2}-(\d\d)$"
^\d{2}(-?)(\d{2}\1){2}\d{2}$
^\d\d(-?)\d\d\1\d\d\1\d\d$
In the begining I was thinking it will match
11-22-3344
Until I realize it will use the match not the expression in the group.
I was not capable to do it the proposed way then I cheat this way
^(\d\d-\d\d-\d\d-\d\d|\d{8})$
But I will try again using the group