in reply to regexp to check if file name matches pattern
and it prints out no. Thanks Smanicka#!/usr/bin/perl $file= "SYSB_A31.GROUPINS%RDEBLIST%REAPPLY%2008.12.16.20.31.35.pdf"; if ($file=~ /^SYS(?:[^%]+%)+[^.]*\.pdf/i){ print "yes"; } else{ print "no"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regexp to check if file name matches pattern
by davido (Cardinal) on Feb 24, 2009 at 22:34 UTC | |
|
Re^2: regexp to check if file name matches pattern
by smanicka (Scribe) on Feb 24, 2009 at 22:28 UTC |