Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

re.search() Python

import re

string = "Python is fun"

# check if 'Python' is at the beginning
match = re.search('APython', string)

if match:
  print("pattern found inside the string")
else:
  print("pattern not found")  

# Output: pattern found inside the string
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Python
ADD COMMENT
Topic
Name
5+3 =