Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Regular Expression in Python

import re
 
s = 'GeeksforGeeks: A computer science portal for geeks'
 
match = re.search(r'portal', s)
 
print('Start Index:', match.start())
print('End Index:', match.end())
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Regular #Expression #Python
ADD COMMENT
Topic
Name
7+9 =