Skip to content

albertosafracodes/Regex-Guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Regex-Guide

Guide for regex

  • \d is a digit 0-9
  • . is for period
  • . is wildcard char
  • [] brackets will match any one char in bracket as an option
  • ^[something] will match to anything but that something
  • you can also do case sense ranges e.g. [A-Z], [a-z], [0-9], [A-Za-z0-9]
  • something { ANumber} will let you match that something ANumber many times.
  • additionally, {lowNum,highNum} will let you match an expression a number in that range many times
  • something* lets you match something with arbitraty repitation while something+ makes sure at least one occurance is satisfied
  • something? means something is optionally matched
  • \s is for any white space including carriage return
  • ^before a something (not in a group) meeans starts with $ after something means ends with
  • () captures whats inside it
  • (something|somethingelse) means something or somethingelse
  • back refrencing is refering to your first captured group as \1 your seconf \2 ect

Releases

No releases published

Packages

No packages published