Created
November 30, 2018 03:22
-
-
Save joshuaaguilar20/62dfa51855b4e250bc456c341267fc97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\s matches any white Space**** | |
\. = anything goes | |
---------------------------------------------------------- | |
Quantifers Modify Char Prior to it | |
*= 0 | |
+=1 | |
?= Matches 0 or 1 of the preceding token, effectively making it optional. | |
------------------------------------------------------------------------------------- | |
Position ^ beginning of ^\w (All the first words of the line. (^\w | |
$= End of. | |
\b = between words* | |
------------------------------------------------------------------------------------------- | |
Meta-chars | |
charater class [abc] brackets act as || operator | |
(example- l[yi]nk will find link and lynk | |
when put in brackets means literal [abc] | |
if you need to search for something that is used as symbol ESC with \. | |
searches for literally a . and not everything. | |
----------------------------------------------------------------------------------------- | |
\ ( ?\ d { 3 } [-.) ] \ d { 3 } [-.] \ d { 4 } | |
translation | |
look for a literally open \( optionally ? followed by 3 digits. followed by a literal . or ) or - followed | |
by 3 digits followed by a literal . or ) or - followed by 4 digits | |
if dash is not first charater*** then it means through like 4-9 1-10 etc. | |
same goes with ^ if it is the first char is inside of brackets then it MEANS IS NOT | |
example | |
[^A-Z] means is NOT A-Z | |
if in middle like this [A^B] looking for literal char. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment