MemoryRefresh!

Egrep / Start of a line     Start of a line



Questions Answers 0%

Pages   0 from 15
Questions   0 from 20

Reset



The easiest metacharacters to understand are ^ (caret) and $ (dolar), which represent the start and end of the line of the text being checked.
Interpretation
It's best to get into the habit of interpreting regular expressions in a rather literal way. Don't think: ^cat matches a line with cat at the beginning But rather: ^cat mathces if you have the beginning of a line, followed immediately by c, then a, then t
Literal means
^$ matches if the line has a beginning-of-line, followed immediately by the end of the line Effectively means: an empty line (with nothing on it, not even spaces)
1) Regex to match cat in "Simon's cat"




2) Match empty lines




3) What /^cat/ literaly does








The easiest metacharacters to understand are ^ (caret) and $ (dolar), which represent the start and end of the line of the text being checked.
Interpretation
It's best to get into the habit of interpreting regular expressions in a rather literal way. Don't think: ^cat matches a line with cat at the beginning But rather: ^cat mathces if you have the beginning of a line, followed immediately by c, then a, then t
Literal means
^$ matches if the line has a beginning-of-line, followed immediately by the end of the line Effectively means: an empty line (with nothing on it, not even spaces)

References









Programming

Php
   
Regex
   
MySQL
   
Css
   
jQuery
   
Git
   


References