in reply to How we can separate a backref from a digit?

A few more ways, I think the last would be my choice

print "Match1\n" if "aa1" =~ /^(a)\1()1$/;; Match1 print "Match1\n" if "aa1" =~ /^(a)\1(?:)1$/;; Match1 print "Match1\n" if "aa1" =~ /^(a)\1(?:1)$/;; Match1 print "Match1\n" if "aa1" =~ /^(a)\1+1$/;; Match1 print "Match1\n" if "aa1" =~ /^(a)\1{1}1$/;; Match1

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.