Changes

Jump to: navigation, search

Tutorial9: Regular Expressions

6 bytes added, 09:12, 9 March 2021
INVESTIGATION 1: SIMPLE & COMPLEX REGULAR EXPRESSIONS
# '''Login''' to your matrix account.<br><br>
# Issue a Linux command to '''confirm''' you are located in your '''home''' directory.<br><br>The '''wget''' command is used to download files from the Internet to your shell.<br>This will be useful to download '''text files''' and '''data files''' that we will be using for this tutorial.<br><br>
# Issue the following linux Linux command to '''download ''' a text file to your '''home''' directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">wget <nowiki>https://ict.senecacollege.ca/~murray.saul/uli101/textfile1.txt</nowiki></span><br><br>
# Issue the '''ls''' Linux command to confirm that the text file was downloaded.<br><br>
# View the contents of the '''textfile1.txt''' file using the '''more''' command and quickly view the contents of this file.<br><br>Although there are several Linux commands that use regular expressions,<br>we will only be using the '''grep''' command for this investigation.<br><br>[[Image:regexps-1.png|thumb|right|250px|Output of '''grep''' command matching simple regular expression "'''the'''" (only lowercase). Notice the pattern matches larger words like "'''their'''" or "'''them'''".]]
13,420
edits

Navigation menu