Open main menu

CDOT Wiki β

Changes

Tutorial9: Regular Expressions

28 bytes added, 09:22, 7 July 2020
INVESTIGATION 2: EXTENDED REGULAR EXPRESSIONS
# Reissue the previous command including a space in brackets:<br><span style="color:blue;font-weight:bold;font-family:courier;">egrep -i "(the ){2,}" numbers2.dat | more</span><br><br>The or symbol | can be used within the grouping regular expression symbol to allow matching of additional groups of characters. Again, it is important to follow the character groupings with the space character<br><br>
# Issue the following linux command to search for 2 or more occurrences of the word "the" or the word "and":<br><span style="color:blue;font-weight:bold;font-family:courier;">egrep -i "(the |and ){2,}" numbers2.dat | more</span><br><br>
 
Proceed to Investigation 3
=INVESTIGATION 3: OTHER COMMANDS THAT USE REGULAR EXPRESSIONS =
13,420
edits