Share this post

Link to post

Share on other sites

Ascend4nt 118

Ascend4nt 118

toxicdav3, you are looking for text between <item> and </item>, correct? Your examples do not have either of those strings in them, that's the problem - we need to see what it is you are pulling from.

Also, using option 1 in StringRegExp will return only one result per pair of parentheses, so in your example it will only return a 1 element array (if something matches). Option 3 will do a repeated search for those items until it reaches the end of the string.

*edit: oops, just realized you are talking about two different things. The 2nd item we'd also need to know what specifically separates the season/episode from the rest of the text.

For example, is it 'ATVShow.s1e01.dvd.info.txt' or 'A TV Show 1x01.info.txt' or 'A-TV-Show on NBC Season 1 Ep 1 info.txt'

If it can be any of the above, you're not going to wind up with a Regular Expression that can do all the work for you. There has to be some type of logical consistent order. And what if the TV Show itself has any of those characters? Like, if they had a TV series based on the movie: 'Open Season Season 1 Ep 2'. How are you going to distinguish without a given order, or special separators.. it's one thing to find consistent formatted things like s1e12 or 3x04, but the other random possibilities requires a lot of string interpreting.

Share this post

Link to post

Share on other sites

toxicdav3 0

toxicdav3 0

I'll just leave it to stringbetween for now. How would i go about splitting this and using StringRegExp to get the season and episode? All dots, dashes, etc are replaced by spaces so there is no need to worry about that.

Share this post

Link to post

Share on other sites

Ascend4nt 118

Ascend4nt 118

I'll just leave it to stringbetween for now. How would i go about splitting this and using StringRegExp to get the season and episode? All dots, dashes, etc are replaced by spaces so there is no need to worry about that.

Show Name ~ s01e01 ~ WS PDTV XviD RLSGROUP

Okay, the simplest way - if you are *always* getting s##e##, and there aren't other matches in the string:

StringRegExp($Str,"(?i)s(\d{1,2})e(\d{1,2})",1)

(Note I let it take 1 or 2 digits. If its *always* 2, just change it to {2})

Now if it's something *between* ~'s and a space, then you can just change the above to add the tildes and space: