regex for autorec
#1
Tongue 
Just spent the last 20 minutes working out the regex to record this seasons LIVE only Super Rugby games.

last year it was as simple as 'Super Rugby Live'

This year they are sending down the EPG guide as Super Rugby: XXX v YYY LIVE so to avoid missing games you need to ignore the XXX v YYY bit and also as you don't want to record the replays you want to match on live.

The magic string to accomplish this.
Code:
\w*(Super Rugby:)\s\w*\sv\s\w*\s\w*(LIVE)

Basically match Super Rugby: ignore the middle and match LIVE results in all Live Super Rugby games being scheduled by the automatic recorder..
Reply
#2
Wouldn't the following have done the trick?

Quote:Super Rugby*\(LIVE\)$
Reply
#3
Will try it out. looks much easier...

Tried it on regex101.com

"Your pattern does not match the subject string."
Reply
#4
No, but ^Super Rugby.*LIVE$ would work

Or ^Super Rugby.*\(LIVE\)$ if the brackets are included

Or ^Super Rugby.*\(*LIVE\)*$ if the brackets are only there sometimes

Ah, the joy of regexp... so many ways to tie yourself in knots and not see the unexpected string that doesn't quite match... Smile
Reply
#5
I managed to simplify it a little.

Code:
\w*(Super Rugby:).*\w*(LIVE)$
Reply



Logout Mark Read Team Forum Stats Members Help
regex for autorec0
This forum uses Lukasz Tkacz MyBB addons.