Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python regex group

>>> p = re.compile('(a(b)c)d')
>>> m = p.match('abcd')
>>> m.group(0)
'abcd'
>>> m.group(1)
'abc'
>>> m.group(2)
'b'
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #regex #group
ADD COMMENT
Topic
Name
7+6 =