Explanation for a complicated regular expression

I have some text data as follows.

{"Timestamp": "Tue Apr 07 00:32:29 EDT 2015",Title: Indian Herald: India's Latest News, Business, Sport, Weather, Travel, Technology, Entertainment, Politics, Finance <br><br>Product: Gecko<br>CPUs: 8<br>Language: en-GB"}

From the below text if I want to extract title alone (Indian Herald: India's Latest News, Business, Sport, Weather, Travel, Technology, Entertainment, Politics, Finance)

I use the following regular expression.

appcodename = re.search(r'Title: ((?:(?!<br>).)+)', message).group(1)

I am trying to understand how the above regular expression works.

(?!<br>) is a negative lookahead for <br>

(?:(?!<br>).)+) – what does this mean? Can someone break it down for me.
Also how many capture groups are there in the regular expression.


Source: regex

Leave a Reply