Hi all
I'm trying to write a regex within a perl script to identify items created by Oracle SR module.
As files are received I am looking for directory names with the pattern of SR###### - this is the minimum. (That would be the alpha chars SR followed by 6 numerics.) Acceptable characters are alphanumerics, hyphen (-) and underscore (_) up to 25 total length.
The SR can be upper or lower case followed by 6 numerics. The remaining 17 characters cannot have any spaces.
Been looking and trying, here is my latest
Code:
/(^[Ss][Rr]\d{6})+([\w_-]$)/
As an example, a file arrives with the name of
- this would be accepted.
A file name of
or
would also be accepted.
A file name of
is not accepted (does not begin with SR) nor is
(space in the name)
Many thanks