-
November 19th, 2012, 06:07 AM
#1
Getting my head round Regex
I am hopeful there is a Regex guru who can help me with this particular problem. I have not had a great amount of experience using regex, though am mostly fine with the simpler elements.
What I am trying to do is strip a certain element from a string that contains a full filename with bracketed data. The data I need to check for is in the format(s) of,
(Disc 1 of 2)
(disc 1)
(1/2)
(disc 1/2)
and variations of. These are unique and only one instance is present per string (or none)
I need to locate these and extract the first value (numerical), a '1' in the cases posted. This value I want to use to create a uniform format of the myrad of formats shown above.
The second number is not needed as I only want to create a string of the format
(Disc x)
Any help would be wonderful as I have been struggling with this for some time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|