Skip to content

Instantly share code, notes, and snippets.

@joshuaaguilar20
Created November 30, 2018 03:22
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 joshuaaguilar20/62dfa51855b4e250bc456c341267fc97 to your computer and use it in GitHub Desktop.
Save joshuaaguilar20/62dfa51855b4e250bc456c341267fc97 to your computer and use it in GitHub Desktop.
\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