#!/usr/bin/perl # http://perlmonks.org/?node_id=1178340 use strict; use warnings; while(<DATA>) { print /^(?!.*(?:-|_|^)\d)/ ? " matched $_" : "not matched $_"; } __DATA__ aa1.2 aa1_bb2 aa1_2 aa1_2bb 1aa
In reply to Re^3: Regex pattern that fails when string contains a certain pattern
by tybalt89
in thread Regex pattern that fails when string contains a certain pattern
by hoppfrosch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |