C# and regex continued

N

Nightcrawler

Kevin Spencer was kind enough to provide me with the following regular
expression: (?<artist>\w+)\s+-\s+(?<title>\w+)(?:\s+[\(\[](?<remix>\w+)
[)\]])?

This works great when I try to group the following mp3 naming
conventions:

Artist - Title [Remix]
Artist - Title (Remix)
Artist - Title

How can I modify the above regular expression to to include characters
like hyphens, underscores, and spaces. Here is a sample list of
titles.

JP Conley - Karma Moods [Soul Mix]
Soul Beats - Wherever You Go... [Love Mix]
Thievery Corporation - Doors Of Perception
Thievery Corporation - Holographic Universe
Ananda Project - Universal Love [Jay-J's Shifted Up Mix]
Collective Sound Members - Switch
Cool Touch - Gravity
Dennis Ferrer - Church Lady Part 2 [Bryan Cox Remix]
Air - Cherry Blossom Girl (Because You Blossom) [DJ AM Mix]

Any help is appreciated.

Thanks
 
J

Jesse Houwing

* Nightcrawler wrote, On 21-5-2007 19:51:
Kevin Spencer was kind enough to provide me with the following regular
expression: (?<artist>\w+)\s+-\s+(?<title>\w+)(?:\s+[\(\[](?<remix>\w+)
[)\]])?

This works great when I try to group the following mp3 naming
conventions:

Artist - Title [Remix]
Artist - Title (Remix)
Artist - Title

How can I modify the above regular expression to to include characters
like hyphens, underscores, and spaces. Here is a sample list of
titles.

JP Conley - Karma Moods [Soul Mix]
Soul Beats - Wherever You Go... [Love Mix]
Thievery Corporation - Doors Of Perception
Thievery Corporation - Holographic Universe
Ananda Project - Universal Love [Jay-J's Shifted Up Mix]
Collective Sound Members - Switch
Cool Touch - Gravity
Dennis Ferrer - Church Lady Part 2 [Bryan Cox Remix]
Air - Cherry Blossom Girl (Because You Blossom) [DJ AM Mix]

Any help is appreciated.

Thanks

See my new reply to your original post. They must have crossed :)

Jesse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

C# and regex issue 7

Top