regex Part 2 - Searching
LPI E - Data Manipulation 3.2 Searching and Extracting Data from Files Regular Expressions (regex) Part 2 of 2 Part 1: Data Manip Tools regex is a powerful tool for searching and manipulating text in Linux and are patterns that describe a set of strings. It is commonly used in commands like grep, sed, awk, and others. It be used in combination with Linux terminal commands to filter and manipulate text output. Here are some basic examples of how to use regular expressions for I/O redirection with Linux terminal commands ( I/O redirection is a way to redirect the input or output of a command to a file or another command. ) The dot (.) character For example, the regular expression "c.t" matches any string that contains a "c" followed by any single character and then a "t". This would match "cat", "cot", "cut", and so on. Matching any character : $ ls | grep '.*\...' In this command, the dot (.) character matches any ...