How to make a regex pattern? Python
Question:
...id|123|...
I need to get the id value. I tried:
print(re.search('id|(.*?)|', str)
but it printed a space
Answers:
"|"
in regular expression means "either or"
"|"
searches for the character "|"
try 'id|(.*?)|'
...id|123|...
I need to get the id value. I tried:
print(re.search('id|(.*?)|', str)
but it printed a space
"|"
in regular expression means "either or"
"|"
searches for the character "|"
try 'id|(.*?)|'