class: center, middle, inverse # Introducción a la Programación I Regex --- # Agenda - Regex .center[![Regex](/prog1/presentation/regex/xkcd_regular_expressions.png)] --- # Regular Expressions - Regular expressions (regex or regexp) are powerful tools used in computer science and programming to search, match, and manipulate text patterns. - Why would I use a regular expresion? - Pattern matching, text manipulation, input validation, data extraction, parsing, text editors / IDE, data validation and transformation, automation, cross-platform compatibility, problem solving. --- # An expression - ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ --- # Learning regex - https://regexone.com/ - Regex one is a website that offers free interactive lessons and tutorials on regular expressions. It's a popular resource for individuals who want to learn and practice regex in a hands-on manner. - https://regexr.com/ --- # Useful methods - Findall https://www.codecademy.com/resources/docs/python/regex/findall - Sub https://www.codecademy.com/resources/docs/python/regex/sub