I need to match numbers 200-220 in a string, this seems pretty simple but i'm having a hard time getting it to match exactly those numbers.. matching 200-219 i can do but matching up to 220 but not 221 im struggling with.
sample:
#!/usr/bin/perl
my $var = $ARGV[0];
if ( $var =~ /2[0-1][0-9]/ ) { print "$var\n"; }
but for matching up to 220 isnt really working for me, can someone point me in the right direction?
sample:
#!/usr/bin/perl
my $var = $ARGV[0];
if ( $var =~ /2[0-1][0-9]/ ) { print "$var\n"; }
but for matching up to 220 isnt really working for me, can someone point me in the right direction?