SlideShare une entreprise Scribd logo
1  sur  75
Télécharger pour lire hors ligne
Abstract Machine




Regex Habits       © blog.staffannoteberg.com (1)
Glob




Regex Habits   © blog.staffannoteberg.com (2)
Origin




Regex Habits   © blog.staffannoteberg.com (3)
Functions




Regex Habits   © blog.staffannoteberg.com (4)
Architecture




Regex Habits   © blog.staffannoteberg.com (5)
Directed Graph
(nondeterministic)




Regex Habits     © blog.staffannoteberg.com (6)
Alphabet




Regex Habits   © blog.staffannoteberg.com (7)
States




Regex Habits   © blog.staffannoteberg.com (8)
Transition Table




Regex Habits       © blog.staffannoteberg.com (9)
Nondeterministic Finite
Automata (NFA)




Regex Habits     © blog.staffannoteberg.com (10)
Directed Graph (DFA/NFA)




Regex Habits   © blog.staffannoteberg.com (11)
Deterministic Finite Automata
(DFA)




Regex Habits    © blog.staffannoteberg.com (12)
Regular Expressions




Regex Habits    © blog.staffannoteberg.com (13)
Matching One Character




Regex Habits   © blog.staffannoteberg.com (14)
Operator #1: Concatenation




Regex Habits    © blog.staffannoteberg.com (15)
Operator #2: Kleene Star




Regex Habits     © blog.staffannoteberg.com (16)
Operator #3: Alternation




Regex Habits     © blog.staffannoteberg.com (17)
Quiz #1




Keskiviikko|(Maanan|Tiis|Tors|
    Perjan|Lauan|Sunnun)tai




Regex Habits      © blog.staffannoteberg.com (18)
Parentheses




Regex Habits   © blog.staffannoteberg.com (19)
Quiz #2




               saippuakivikauppias




Regex Habits               © blog.staffannoteberg.com (20)
Finite




Regex Habits   © blog.staffannoteberg.com (21)
Regular Regex?




Regex Habits     © blog.staffannoteberg.com (22)
Greedy (Kleene Star)




Regex Habits     © blog.staffannoteberg.com (23)
Backtracking (NFA)




Regex Habits    © blog.staffannoteberg.com (24)
Leftmost (NFA Alternation)




Regex Habits    © blog.staffannoteberg.com (25)
Dialects




Regex Habits   © blog.staffannoteberg.com (26)
Regex Literal




Regex Habits    © blog.staffannoteberg.com (27)
Architecture




Regex Habits   © blog.staffannoteberg.com (28)
Regex Objects




Regex Habits    © blog.staffannoteberg.com (29)
Match Object




Regex Habits   © blog.staffannoteberg.com (30)
Quantifiers




Regex Habits   © blog.staffannoteberg.com (31)
Quiz #3




(0|1|2)(0|1|2|3|4|5|6|7|8|9){2}




Regex Habits      © blog.staffannoteberg.com (32)
Quantifier algebra




Regex Habits     © blog.staffannoteberg.com (33)
Positive Closure over Closure




Regex Habits     © blog.staffannoteberg.com (34)
Character Class




Regex Habits      © blog.staffannoteberg.com (35)
Quiz #4




       [a-z0-9._-]+@[a-z0-9.-]+
             .[a-z]{2,6}




Regex Habits          © blog.staffannoteberg.com (36)
Quiz #5




         25[0-5]|2[0-4][0-9]|
        1[0-9][0-9]|[1-9]?[0-9]




Regex Habits          © blog.staffannoteberg.com (37)
Metacharacters – shorthands




Regex Habits    © blog.staffannoteberg.com (38)
Quiz #6




               2(0|1)dd1




Regex Habits           © blog.staffannoteberg.com (39)
Quiz #7




    (0|(00|+)358)(4d|50)d{7}




Regex Habits        © blog.staffannoteberg.com (40)
Metacharacters – dot




Regex Habits     © blog.staffannoteberg.com (41)
Economical use of Dot




Regex Habits    © blog.staffannoteberg.com (42)
Quiz #8




               .+@.+




Regex Habits           © blog.staffannoteberg.com (43)
Metacharacters – Unicode




Regex Habits    © blog.staffannoteberg.com (44)
Quiz #9




               d+(,dd)?s?u20AC




Regex Habits                © blog.staffannoteberg.com (45)
Assertions – Anchor




Regex Habits    © blog.staffannoteberg.com (46)
Quiz #10




               ^s+

               s+$




Regex Habits          © blog.staffannoteberg.com (47)
Assertions – Lookaround




Regex Habits    © blog.staffannoteberg.com (48)
Quiz #11




      ^(?=.*d)(?=.*([a-zA-Z]))
               .{8,40}$




Regex Habits         © blog.staffannoteberg.com (49)
Mode




Regex Habits   © blog.staffannoteberg.com (50)
Capture and Backreference




Regex Habits    © blog.staffannoteberg.com (51)
Quiz #12




          <(w+)[^>]*>[^<]*</1>




Regex Habits            © blog.staffannoteberg.com (52)
Lazy Quantifiers




Regex Habits       © blog.staffannoteberg.com (53)
Web Test bench




Regex Habits     © blog.staffannoteberg.com (54)
REPL Test bench




Regex Habits      © blog.staffannoteberg.com (55)
Test-driven development




Regex Habits    © blog.staffannoteberg.com (56)
Study data source




Regex Habits        © blog.staffannoteberg.com (57)
Accept some incorrect




Regex Habits    © blog.staffannoteberg.com (58)
Deny some correct




Regex Habits    © blog.staffannoteberg.com (59)
Simple method




Regex Habits    © blog.staffannoteberg.com (60)
Shrink or Expand




Regex Habits       © blog.staffannoteberg.com (61)
Split




Regex Habits   © blog.staffannoteberg.com (62)
Blend imperative and regex




Regex Habits    © blog.staffannoteberg.com (63)
Context unaware




Regex Habits      © blog.staffannoteberg.com (64)
Consider Regex modes




Regex Habits   © blog.staffannoteberg.com (65)
Regex Inject Attack




Regex Habits     © blog.staffannoteberg.com (66)
Documentation




Regex Habits    © blog.staffannoteberg.com (67)
Use Lazy Quantifiers




Regex Habits     © blog.staffannoteberg.com (68)
Fail fast




Regex Habits   © blog.staffannoteberg.com (69)
Compile only once




Regex Habits   © blog.staffannoteberg.com (70)
Minimize Nested Quantifiers




Regex Habits    © blog.staffannoteberg.com (71)
Boundaries in find




Regex Habits     © blog.staffannoteberg.com (72)
Applications




Regex Habits   © blog.staffannoteberg.com (73)
Resources




Regex Habits   © blog.staffannoteberg.com (74)
Staffan Nöteberg

Book:
Pomodoro Technique Illustrated
www.pomodoro-book.com

Twitter: staffannoteberg
http://blog.staffannoteberg.com




 Regex Habits             © blog.staffannoteberg.com (75)

Contenu connexe

Similaire à Regex -- Turku Agile Day 011

Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Paul King
 
Google Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG NantesGoogle Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG Nantes
mikaelbarbero
 
Design patterns and MV
Design patterns and MVDesign patterns and MV
Design patterns and MV
Sway Wang
 
Practical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyPractical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in Groovy
Guillaume Laforge
 

Similaire à Regex -- Turku Agile Day 011 (20)

DerbyCon 7.0 Legacy: Regular Expressions (Regex) Overview
DerbyCon 7.0 Legacy: Regular Expressions (Regex) OverviewDerbyCon 7.0 Legacy: Regular Expressions (Regex) Overview
DerbyCon 7.0 Legacy: Regular Expressions (Regex) Overview
 
Regular Expressions: JavaScript And Beyond
Regular Expressions: JavaScript And BeyondRegular Expressions: JavaScript And Beyond
Regular Expressions: JavaScript And Beyond
 
Final Table of Content
Final Table of ContentFinal Table of Content
Final Table of Content
 
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume LaforgeGroovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
Groovy in the Enterprise - Case Studies - TSSJS Prague 2008 - Guillaume Laforge
 
mod_rewrite
mod_rewritemod_rewrite
mod_rewrite
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
 
jQuery, eCSStender & You [DevChatt 2011]
jQuery, eCSStender & You [DevChatt 2011]jQuery, eCSStender & You [DevChatt 2011]
jQuery, eCSStender & You [DevChatt 2011]
 
Latex symbols and commands
Latex symbols  and commandsLatex symbols  and commands
Latex symbols and commands
 
jQuery Mobile & PhoneGap
jQuery Mobile & PhoneGapjQuery Mobile & PhoneGap
jQuery Mobile & PhoneGap
 
Deobfuscation and beyond (ZeroNights, 2014)
Deobfuscation and beyond (ZeroNights, 2014)Deobfuscation and beyond (ZeroNights, 2014)
Deobfuscation and beyond (ZeroNights, 2014)
 
Guava & EMF
Guava & EMFGuava & EMF
Guava & EMF
 
Google Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG NantesGoogle Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG Nantes
 
How to Teach an Old Dog New Tricks, AtlasCamp US 2012
How to Teach an Old Dog New Tricks, AtlasCamp US 2012How to Teach an Old Dog New Tricks, AtlasCamp US 2012
How to Teach an Old Dog New Tricks, AtlasCamp US 2012
 
Design patterns and MV
Design patterns and MVDesign patterns and MV
Design patterns and MV
 
Modern Webdevelopment With Ruby On Rails
Modern Webdevelopment With Ruby On RailsModern Webdevelopment With Ruby On Rails
Modern Webdevelopment With Ruby On Rails
 
Practical Groovy DSL
Practical Groovy DSLPractical Groovy DSL
Practical Groovy DSL
 
Practical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in GroovyPractical Domain-Specific Languages in Groovy
Practical Domain-Specific Languages in Groovy
 
bluespec talk
bluespec talkbluespec talk
bluespec talk
 
How to check valid Email? Find using regex.
How to check valid Email? Find using regex.How to check valid Email? Find using regex.
How to check valid Email? Find using regex.
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 

Plus de Staffan Nöteberg

2013-11-27 JDays - Spider and Ants
2013-11-27 JDays - Spider and Ants2013-11-27 JDays - Spider and Ants
2013-11-27 JDays - Spider and Ants
Staffan Nöteberg
 
2013 03-12 Change – How long does it take?
2013 03-12 Change – How long does it take?2013 03-12 Change – How long does it take?
2013 03-12 Change – How long does it take?
Staffan Nöteberg
 
2011 01-21 Timeboxed Thinking
2011 01-21 Timeboxed Thinking2011 01-21 Timeboxed Thinking
2011 01-21 Timeboxed Thinking
Staffan Nöteberg
 

Plus de Staffan Nöteberg (10)

2013-11-27 JDays - Spider and Ants
2013-11-27 JDays - Spider and Ants2013-11-27 JDays - Spider and Ants
2013-11-27 JDays - Spider and Ants
 
2013 03-12 Change – How long does it take?
2013 03-12 Change – How long does it take?2013 03-12 Change – How long does it take?
2013 03-12 Change – How long does it take?
 
2012-02-15 jfokus2012 - regex applied
2012-02-15 jfokus2012 - regex applied2012-02-15 jfokus2012 - regex applied
2012-02-15 jfokus2012 - regex applied
 
2011-09-19 Regex Day
2011-09-19 Regex Day2011-09-19 Regex Day
2011-09-19 Regex Day
 
SHRUGSE regex cheat sheet
SHRUGSE regex cheat sheetSHRUGSE regex cheat sheet
SHRUGSE regex cheat sheet
 
2011 01-21 Timeboxed Thinking
2011 01-21 Timeboxed Thinking2011 01-21 Timeboxed Thinking
2011 01-21 Timeboxed Thinking
 
Agila Sverige 2010 - Timeboxed Thinking
Agila Sverige 2010 - Timeboxed ThinkingAgila Sverige 2010 - Timeboxed Thinking
Agila Sverige 2010 - Timeboxed Thinking
 
Daily Mind Map
Daily Mind MapDaily Mind Map
Daily Mind Map
 
La Tomatina - 27th August 2008 in Bunõl
La Tomatina - 27th August 2008 in BunõlLa Tomatina - 27th August 2008 in Bunõl
La Tomatina - 27th August 2008 in Bunõl
 
XP Bill of Rights
XP Bill of RightsXP Bill of Rights
XP Bill of Rights
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Regex -- Turku Agile Day 011