in reply to Hlelp regarding regex
Your specification is extremely unclear. Could you possibly explain what exactly you're wanting to verify about the Y character in the string?
If you have trouble explaining what you want, you should at least give a list of examples of strings that you do want to match, and a counter list of failed matches.
The below regex matches your string, but given your unclear spec, it probably isn't useful.
my $x = "\\\\files\\builds\\data\\M9998SBQCACSYD30401S"; if ($x =~ /Y\D\d+\D*$/){ print "This matches something, don't know if it's really what you +want"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hlelp regarding regex
by Anonymous Monk on Jun 02, 2011 at 04:08 UTC | |
by bart (Canon) on Jun 02, 2011 at 08:39 UTC | |
by wind (Priest) on Jun 02, 2011 at 15:25 UTC |