Page 1 of 1

Regular expression to create subdirectories

Posted: 30 Apr 2015, 19:40
by superchicken
Regular expressions have eluded me... I need to know, what would be the regular expression to use to create sub-drectories named after the original album name on imagefap.

example:

http://www.imagefap.com/pictures/539833 ... Cappotelli

Out of this url, I'd like to make a sub-directory named Tiffany Cappotelli without the hyphen.

Re: Regular expression to create subdirectories

Posted: 03 May 2015, 14:30
by Maksym
Well, EPF doesn't offer "replace" functionality with Regular Expresions, only "match" is available. So, if you want a generic RE for this case that would be:

RE: /\d+/(.+?)$
Result: [#1]

But if you know that all gallerie names will consist of 2 words and a hyphen between them, then you could use this one:

RE: /\d+/(.+?)-(.+?)$
Result: [#1] [#2]