Skip to content

Instantly share code, notes, and snippets.

@StephenFordham
Last active April 8, 2019 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StephenFordham/b5b756f415bf1e3f85b1cbeaa0fda037 to your computer and use it in GitHub Desktop.
Save StephenFordham/b5b756f415bf1e3f85b1cbeaa0fda037 to your computer and use it in GitHub Desktop.
Getting started with re.search
import re
DNA = 'GAGCGCTAGCCAAA'
match = re.search(pattern='AAA', string=DNA)
# match = re.search('AAA', 'DNA')
print(match)
<re.Match object; span=(11, 14), match='AAA'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment