Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

regex emaple py

Python has a module named re to work with RegEx. Here's an example:

import re

pattern = '^a...s$'
test_string = 'abyss'
result = re.match(pattern, test_string)

if result:
  print("Search successful.")
else:
  print("Search unsuccessful.")	
 
PREVIOUS NEXT
Tagged: #regex #emaple #py
ADD COMMENT
Topic
Name
3+5 =