Extracting a string between specified characters in python
- by Seth
I'm a newbie to regular expressions and I have the following string:
sequence = ["{\"First\":\"Belyuen,NT,0801\",\"Second\":\"Belyuen,NT,0801\"}","{\"First\":\"Larrakeyah,NT,0801\",\"Second\":\"Larrakeyah,NT,0801\"}"]
I am trying to extract the text Belyuen,NT,0801 and Larrakeyah,NT,0801 in python. I have the following code which is not working:
re.search('\:\\"...\\', ''.join(sequence))
I.e. I want to get the string between characters :\ and \.