This is a tutorial on building a URL search with a regular expression. This will cover part or most of the syntax.
I will be describing the syntax of a regular expression provided by the Challenge 17 documentation.
The following code snippet is from the readme.md file which describes searching for a matching email using a regular expression:
/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
- Anchors
- Quantifiers
- Grouping Constructs
- Bracket Expressions
- Character Classes
- The OR Operator
- Flags
- Character Escapes
^ is a carrot ? is zero or one () Parenthesis in this context is used for grouops \d is for numbers [] brackets are to match character classes
- is to match one or more { } curly brackets is the range in length . is to match a literal period
- is to match all ?$ is to match a zero or one groups
There are two quantifiers * seen
There are four () groups seen
Brackets are used to find any charaters a through z upper and lower And used to find digits zero through nine
Chater classes are the text that are within the bracket
Alterations {2 through 6} are used to find the length
Sidney Basa From Seattle Washington Security Guard for Hospitals Studying Software Programming Was a student at the University of Washington Seattle campus in 2012 has two associates degrees at Seattle Community College Assosicates of Arts Associates of Science in Diesel and Heavy Machinery