smanicka has asked for the wisdom of the Perl Monks concerning the following question:
Could anyone help me write a regexp to check if a given filename matches this pattern?
I figure i have to say =~/^SYS something /i but i am not sure how exactly to match up with the first 2 percentage signs, the time date stamp is not of concern.Any help would be appreciated.i need to do : if filename matches pattern, do action .else skip
i am attempting the regex as =~m/^SYS\w%\w%\w.*/iWould this work? Thanks
- Sandhya
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp to check if file name matches pattern
by davido (Cardinal) on Feb 24, 2009 at 22:07 UTC | |
by smanicka (Scribe) on Feb 24, 2009 at 22:11 UTC | |
by davido (Cardinal) on Feb 24, 2009 at 22:15 UTC | |
|
Re: regexp to check if file name matches pattern
by Marshall (Canon) on Feb 24, 2009 at 23:22 UTC | |
|
Re: regexp to check if file name matches pattern
by smanicka (Scribe) on Feb 24, 2009 at 22:24 UTC | |
by davido (Cardinal) on Feb 24, 2009 at 22:34 UTC | |
by smanicka (Scribe) on Feb 24, 2009 at 22:28 UTC | |
|
Re: regexp to check if file name matches pattern
by Grey Fox (Chaplain) on Feb 25, 2009 at 18:13 UTC |