Hi guys,

Im embarking on something new (to me).

Im creating a matchign expression system for a music video collection app.

Essentially for the program to find the files, the user inputs a mask to help find the files and identify tags in the file name.

e.g %artist%\%artist% - %title%.%ext%

What would be the best way of implementing the parsing code? Being user supplied it could be any combination, with or without folders, (e.g %artist% - %title%.%ext%) or (%artist%\%album%\%title%.ext)

Any ideas? Anyone been down this road before and have some nice code for me? :p

Just some tips to get started will help.

Thanks in advance...

Well, you could simply use the Split method (e.g. str.Split('%'); ). Every even, or 0, numbered index in the string array would be the regular part of the string, and every odd numbered index would be a mask. Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.