Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Getting the string and the regex of the matched object

import re
 
s = "Welcome to Softhunt"
 
# here x is the match object
res = re.search(r"S", s)
 
print(res.re)
print(res.string)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Getting #string #regex #matched #object
ADD COMMENT
Topic
Name
9+2 =