in reply to Re: Detect presence of numbers 1-9
in thread Detect presence of numbers 1-9
if ( $scalar =~ /^[12345]+$/ ) {
Please note that $ also matches before a trailing \n character, and that this regex also matches "111\n". But I'd go for the negative match anyway, because it seems more natural to me.
U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk
|
|---|