Kodi Community Forum

Full Version: Regex help needed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey so im trying to find a pattern but im not that good at regex so would ask for some help here Smile

PHP Code:
<b><span style='font-size:18px'>bla.</span></b><br><br><img src='https://asdasdasd.jpg'><br><br><b>1x01 - <a style='text-decoration:underline;color:#ffffcc;font-family: verdana,geneva,sans-serif;' href='/?3980&tv=1'>Pilot</a></b> - (Original Air Date16-11-2004)<br><b>1x02 - <a style='text-decoration:underline;color:#ffffcc;font-family: verdana,geneva,sans-serif;' href='/?3981&tv=1'>Paternity</a></b> - (Original Air Date23-11-2004)<br><b>1x03 - <a style='text-decoration:underline;color:#ffffcc;font-family: verdana,geneva,sans-serif;' href='/?3982&tv=1'>Occam's Razor</a></b> - (Original Air Date: 30-11-2004)<br> 

this is my string. Where im trying to get ex: group1[1x01, /?3980&tv=1, Pilot] group2[1x02, /?3981&tv=1, Paternity], to be grouped.

i just want the pattern

thanks in advance Smile
First, this is not the right area to post for any type of development help, and probably it will be moved.

but for your query,

<br><b>(.+?)<a.+?href='(.+?)'

should do the trick.
(2017-02-16, 16:13)yocoldrain Wrote: [ -> ]First, this is not the right area to post for any type of development help, and probably it will be moved.

but for your query,

<br><b>(.+?)<a.+?href='(.+?)'

should do the trick.

Thank u very much for the example, it really helped me Smile

i will remember the next time to post it the right place :/

i ended up with: <br><b>(.+?)<a.+?href='(.+?)'>(.+?)</a>