Extracting a string between specified characters in python
Posted
by Seth
on Stack Overflow
See other posts from Stack Overflow
or by Seth
Published on 2010-04-03T13:34:50Z
Indexed on
2010/04/03
13:43 UTC
Read the original article
Hit count: 274
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 \
.
© Stack Overflow or respective owner