Page 1 of 1

Help me with this regex please

Posted: Thu Dec 17, 2009 8:50 am
by klevis miho
I want to get from this string:

- Mtv commercial - abu & quiz: the knight rider (teletext pag. 528) - 777 - 778

this string:

Mtv commercial - abu & quiz: the knight rider

Re: Help me with this regex please

Posted: Thu Dec 17, 2009 8:56 am
by klevis miho
with this expression: /- ([^(:-]+)/
that AbraCadaver gave me in one of my posts, I have this result:

Mtv commercial


and with this one: /\- (.*)[ \(.*| \- 77.*|]/
I have this result:

Mtv commercial - abu & quiz: the knight rider (teletext pag. 528) - 777 - 7