Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
8 Cards in this Set
- Front
- Back
Regular Expressions
Period - . |
Definition - Matches any single character, no matter what it is
Examples: r. Matches an r followed by any character .x. Matches an x that is surrounded by any 2 characters ... Matches any 3 characters |
|
Regular Expressions
Carat - ^ |
Definition: When used as the first character in a regular expression, it matches the first line.
Examples: /^the/ Print ant line that starts with the world "the" 1,$s/^/>>/ Switches the start of any line with >> |
|
Regular Expressions
Dollar Sign - $ |
Definition: Matches the end of line similar to the way ^ matches the start of a line
Examples: contents$ Matches any line that ends with the word "contents" |
|
Regular Expressions
Backslash - \ |
Definition: Changes the meaning of a symbol to the ASCII value
Examples: \.$ Any line that ends with a . Without the backslash, the search would produce any line that ends with a SINGLE CHARACTER |
|
Regular Expressions
Matching a Line with No Characters or a single space |
^$
Matches any line that does not contain characters ^ $ Matches any line that contains only a single space character |
|
Regular Expressions
Bracket Construct - [ ] |
Definition: Searches for specific characters listed within the brackets. Essentially is an OR command.
Examples: /the/ Searches for the word "the" starting with a lower case T /[Tt]he/ Searches for the word "the" which starts with either a capital or lowercase T |
|
Regular Expressions
Bracket Construct With Ranges: [ - ] |
Defintions: Using a dash between a certain range of numbers or letters indicates all the numbers or letters between that range
/[0-9]/ Matches any line that conatins a digit between 0 and 9 /^[A-Z]/ Matches any line that begins with an uppercase letter |
|
Regular Expressions
BracketConstruct With Carats: [^] |
Defintion: If the carat is used as the first character after the left bracket, it indicates the inverse operation.
Examples: /[^A-Z]/ Matches any line that does NOT contain a capital letter /[^a-zA-Z]/ Matches all non-alphabetic characters |