in reply to RegExp madness

print if /^(\d)\d{\1}$/; That would match if $_ equalled the string "71{7}" for example. Unless the {n,m} modifier has the correct syntax, it loses its special meaning and just becomes some more characters to match.