help with regular expressions (linux)
plz help!
Create a regular expression to find HTML opening tags.
(eg <h2> or <p style=”margin:5px”> but not </p>)
Create a regular expression to find valid integer numbers (1234 or -45).
Create a regular expression to find dates in the valid ISO8601 format (2008-03-31).
Create a regular expression to match any three letter word that ends in “at” when in
occurs at the beginning of the line.
Create a regular expression to match the subject line in an email. Eg:
Subject: Regular Expressions are fun!
In vi do a substitution that will replace all occurrences of the word half with the word
whole.
In vi do a substitution that will replace any three letter word that starts with t and ends
with n and replace it with three copies of the middle letter. (eg replace tan with aaa,
etc)
Create a regular expression to find HTML opening tags.
(eg <h2> or <p style=”margin:5px”> but not </p>)
Create a regular expression to find valid integer numbers (1234 or -45).
Create a regular expression to find dates in the valid ISO8601 format (2008-03-31).
Create a regular expression to match any three letter word that ends in “at” when in
occurs at the beginning of the line.
Create a regular expression to match the subject line in an email. Eg:
Subject: Regular Expressions are fun!
In vi do a substitution that will replace all occurrences of the word half with the word
whole.
In vi do a substitution that will replace any three letter word that starts with t and ends
with n and replace it with three copies of the middle letter. (eg replace tan with aaa,
etc)
Comments
-
RobertKaucher Member Posts: 4,299 ■■■■■■■■■■This strikes me as homework... So I would encourage other members to not give assistance unless you have specific questions regarding work you have already done. You will find most of the information you need here:
Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns -
jibbajabba Member Posts: 4,317 ■■■■■■■■□□RobertKaucher wrote: »This strikes me as homework... So I would encourage other members to not give assistance unless you have specific questions regarding work you have already done. You will find most of the information you need here:
Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns
Thought so too ... Different story if you'd say that you have a certain regular expression which doesn't work (and post examples) ...
Only thing you are missing are the question numbers :PMy own knowledge base made public: http://open902.com