Changes

Jump to: navigation, search

Tutorial9: Regular Expressions

453 bytes added, 09:28, 6 July 2020
INVESTIGATION 1: SIMPLE & COMPLEX REGULAR EXPRESSIONS
# Issue the following Linux pipeline command:<br><span style="color:blue;font-weight:bold;font-family:courier;">grep -w -i "the$" textfile1.txt | more</span><br><br>What do you notice?<br><br>
# Issue the following Linux pipeline command to anchor the work "the" simultaneously at the beginning and the end of the string:<br><span style="color:blue;font-weight:bold;font-family:courier;">grep -w -i "^the$" textfile1.txt | more</span><br><br>What do you notice?<br><br>Anchoring patterns at both the <u>beginning</u> and <u>ending</u> of strings can greatly assist for more complex search patterns.<br>We will now be demonstrating simultaneous anchoring with other complex regular expressions symbols.<br><br>
# xIssue the following command to match strings that begin with 3 characters:<br><span style="color:blue;font-weight:bold;font-family:courier;">grep -w -i "^..." textfile1.txt | more</span><br><br>What do you notice?<br><br># Issue the following command to match strings that begin and end with 3 characters:<br><span style="color:blue;font-weight:bold;font-family:courier;">grep -w -i "^...$" textfile1.txt | more</span><br><br>What do you notice?<br><br>
=INVESTIGATION 2: EXTENDED REGULAR EXPRESSIONS =
13,420
edits

Navigation menu