For instance, how there is a string a, which is defined as
a = "\"hello\""
how to use re extract the text hello?
m = re.search('"([^"]*)"', a)
m.group(1)
The [^"]* says that there must be no " inside the string.
That is important for cases like:
"a" bcd "e"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With