Hi there! First, thanks for considering my query! I'm currently making a little script (obviously in Perl) and I'm trying to make a regex. My problem is that even if it works, something bothers me: I want to control this:
GigabitEthernet1/0/1with:
/(^gi.*)([1-8])(\/)(0)(\/)([1-9]|[1-3][0-9]|4[0-8])/iI want to make a regex which blocks the user if he inputs something like that:
GigabitEthernet1/0/49The maximum value of the number behind the last slash should be 48, but I cannot make. I don't want to make something like:
if ($6>48)....Could you help me please? Thanks in advance!
In reply to [SOLVED] Regex : Limit value of a string by PtitePomme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |