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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |