I want to extract several value using regular expression in python
The string is id : NAA1, priority : 4, location : WJQ, director : 13, text : HelloWorld
"NAA1, 4, WJQ, 13, HelloWorld" is the value what I want.
At first time, I tried like that
import re
msg = "id : NAA1, priority : 4, location : WJQ, director : 13, text : HelloWorld"
_id = re.search('id : (.*?),', msg)
But I want all value using just one re pattern matching.
idspecifically, but seem to want anywthing after a colon, and don't mind if you havepriorityor whatever before it.