SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
Anchors                                     Quantifiers                                 Groups and Ranges

^                Start of string            *                 0 or more                  .             Any character except
A               Start of string            +                 1 or more                                new line (n)
$                End of string              ?                 0 or 1                     (a|b)         a or b
Z               End of string              {3}               Exactly 3                  (...)         Group
b               Word boundary              {3,}              3 or more                  (?:...)       Passive Group
B               Not word boundary          {3,5}             3, 4 or 5                  [abc]         Range (a or b or c)
<               Start of word                                                           [^abc]        Not a or b or c
>               End of word                                                             [a-q]         Letter between a and q
                                            Quantifier Modifiers
                                                                                         [A-Q]         Upper case letter
                                            quot;xquot; below represents a quantifier                          between A and Q
Character Classes
                                            x?                                           [0-7]         Digit between 0 and 7
                                                              Ungreedy version of quot;xquot;
                                                                                         n          nth group/subpattern
c               Control character
                                                                                         Note: Ranges are inclusive.
s               White space                Escape Character
S               Not white space
d               Digit                                                                 Pattern Modifiers
                                                              Escape Character
D               Not digit
w                                                                                       g            Global match
                 Word
W                                          Metacharacters (must be escaped)             i            Case-insensitive
                 Not word
x                                                                                       m            Multiple lines
                 Hexadecimal digit
                                                   ^             [              .        s            Treat string as single line
O               Octal digit
                                                   $             {              *        x            Allow comments and
                                                   (                           +                     white space in pattern
POSIX
                                                   )             |              ?        e            Evaluate replacement
                                                   <             >                       U            Ungreedy pattern
[:upper:]        Upper case letters
[:lower:]        Lower case letters
[:alpha:]        All letters                Special Characters                          String Replacement (Backreferences)
[:alnum:]        Digits and letters
[:digit:]        Digits                     n                New line                   $n           nth non-passive group
[:xdigit:]       Hexadecimal digits         r                Carriage return            $2           quot;xyzquot; in /^(abc(xyz))$/
[:punct:]        Punctuation                t                Tab                        $1           quot;xyzquot; in /^(?:abc)(xyz)$/
[:blank:]        Space and tab              v                Vertical tab               $`           Before matched string
[:space:]        Blank characters           f                Form feed                  $'           After matched string
[:cntrl:]        Control characters         xxx              Octal character xxx        $+           Last matched string
[:graph:]        Printed characters         xhh              Hex character hh           $&           Entire matched string
[:print:]        Printed characters and
                 spaces                     Sample Patterns
[:word:]         Digits, letters and
                 underscore                 Pattern                                      Will Match
                                            ([A-Za-z0-9-]+)                              Letters, numbers and hyphens
                                            (d{1,2}/d{1,2}/d{4})                    Date (e.g. 21/3/2006)
Assertions
                                            ([^s]+(?=.(jpg|gif|png)).2)              jpg, gif or png image
?=               Lookahead assertion        (^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$)         Any number from 1 to 50 inclusive
?!               Negative lookahead         (#?([A-Fa-f0-9]){3}(([A-Fa-f0-9]){3})?)      Valid hexadecimal colour code
?<=              Lookbehind assertion       ((?=.*d)(?=.*[a-z])(?=.*[A-Z]).{8,15})      String with at least one upper case
?!= or ?<!       Negative lookbehind                                                     letter, one lower case letter, and one
?>               Once-only Subexpression                                                 digit (useful for passwords).
?()              Condition [if then]        (w+@[a-zA-Z_]+?.[a-zA-Z]{2,6})             Email addresses
?()|             Condition [if then else]   (<(/?[^>]+)>)                             HTML Tags
?#               Comment
                                            Note: These patterns are intended for reference purposes and have not been
                                            extensively tested. Please use with caution and test thoroughly before use.
             Available free from
          www.ILoveJackDaniels.com

Weitere ähnliche Inhalte

Ähnlich wie Expresiones Regulares (20)

Regex cheatsheet
Regex cheatsheetRegex cheatsheet
Regex cheatsheet
 
mhg
mhgmhg
mhg
 
test vedio
test vediotest vedio
test vedio
 
qwdeqwe
qwdeqweqwdeqwe
qwdeqwe
 
Added to test pdf
Added to test pdf Added to test pdf
Added to test pdf
 
added for test
added for test added for test
added for test
 
ganesh testing
ganesh testing ganesh testing
ganesh testing
 
now its pdf
now its pdfnow its pdf
now its pdf
 
fghfghf
fghfghffghfghf
fghfghf
 
The hindu
The hinduThe hindu
The hindu
 
Video added by Normal user
Video added by Normal user Video added by Normal user
Video added by Normal user
 
Resource one
Resource one Resource one
Resource one
 
om
omom
om
 
Added to test pdf
Added to test pdf Added to test pdf
Added to test pdf
 
dasdasd
dasdasddasdasd
dasdasd
 
estset
estsetestset
estset
 
1377874234 eeeeeeeeeeeeeeeor more file
1377874234 eeeeeeeeeeeeeeeor more file1377874234 eeeeeeeeeeeeeeeor more file
1377874234 eeeeeeeeeeeeeeeor more file
 
Ganesh added
Ganesh added Ganesh added
Ganesh added
 
test
testtest
test
 
om
omom
om
 

Kürzlich hochgeladen

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 

Kürzlich hochgeladen (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

Expresiones Regulares

  • 1. Anchors Quantifiers Groups and Ranges ^ Start of string * 0 or more . Any character except A Start of string + 1 or more new line (n) $ End of string ? 0 or 1 (a|b) a or b Z End of string {3} Exactly 3 (...) Group b Word boundary {3,} 3 or more (?:...) Passive Group B Not word boundary {3,5} 3, 4 or 5 [abc] Range (a or b or c) < Start of word [^abc] Not a or b or c > End of word [a-q] Letter between a and q Quantifier Modifiers [A-Q] Upper case letter quot;xquot; below represents a quantifier between A and Q Character Classes x? [0-7] Digit between 0 and 7 Ungreedy version of quot;xquot; n nth group/subpattern c Control character Note: Ranges are inclusive. s White space Escape Character S Not white space d Digit Pattern Modifiers Escape Character D Not digit w g Global match Word W Metacharacters (must be escaped) i Case-insensitive Not word x m Multiple lines Hexadecimal digit ^ [ . s Treat string as single line O Octal digit $ { * x Allow comments and ( + white space in pattern POSIX ) | ? e Evaluate replacement < > U Ungreedy pattern [:upper:] Upper case letters [:lower:] Lower case letters [:alpha:] All letters Special Characters String Replacement (Backreferences) [:alnum:] Digits and letters [:digit:] Digits n New line $n nth non-passive group [:xdigit:] Hexadecimal digits r Carriage return $2 quot;xyzquot; in /^(abc(xyz))$/ [:punct:] Punctuation t Tab $1 quot;xyzquot; in /^(?:abc)(xyz)$/ [:blank:] Space and tab v Vertical tab $` Before matched string [:space:] Blank characters f Form feed $' After matched string [:cntrl:] Control characters xxx Octal character xxx $+ Last matched string [:graph:] Printed characters xhh Hex character hh $& Entire matched string [:print:] Printed characters and spaces Sample Patterns [:word:] Digits, letters and underscore Pattern Will Match ([A-Za-z0-9-]+) Letters, numbers and hyphens (d{1,2}/d{1,2}/d{4}) Date (e.g. 21/3/2006) Assertions ([^s]+(?=.(jpg|gif|png)).2) jpg, gif or png image ?= Lookahead assertion (^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$) Any number from 1 to 50 inclusive ?! Negative lookahead (#?([A-Fa-f0-9]){3}(([A-Fa-f0-9]){3})?) Valid hexadecimal colour code ?<= Lookbehind assertion ((?=.*d)(?=.*[a-z])(?=.*[A-Z]).{8,15}) String with at least one upper case ?!= or ?<! Negative lookbehind letter, one lower case letter, and one ?> Once-only Subexpression digit (useful for passwords). ?() Condition [if then] (w+@[a-zA-Z_]+?.[a-zA-Z]{2,6}) Email addresses ?()| Condition [if then else] (<(/?[^>]+)>) HTML Tags ?# Comment Note: These patterns are intended for reference purposes and have not been extensively tested. Please use with caution and test thoroughly before use. Available free from www.ILoveJackDaniels.com