Common examples of SHELL regular expressions

  
 

^ For the beginning of the line $ the end of the line ^the pair with the beginning of the line [Ss]igna[lL] for the matching words signal, signaL, Signal, SignaL[Ss]igna[lL]\\. For the same as above, but add a sentence Point [mayMAY] to a line containing maybe uppercase or lowercase letters ^USER$ to a line containing only USER [tty]$ to a line ending with tty\\. to a line with a period ^d..x..x..x Directory with executable permissions for users, user groups, and other user group members ^[^l] List of directories that exclude associated directories [.*0] Add any character [000*] to 000 or more before or after 0 [iI] for uppercase or lowercase I[iI][nN] for uppercase or lowercase i or n[^$] for blank lines [^.*$] for any string in the matching line ^...$ For lines consisting of 6 characters [a-zA-Z] for any single character [az][az]* for at least one lowercase letter [^0-9\\$] for non-numeric or dollar signs [^0-0A- Za-z] for non-numbers or letters [123] for a number from 1 to 3 [Dd]evice for the word device or DeviceDe..ce for the first two letters De, followed by two arbitrary characters, and finally ce\\^ q pairs start with ^q ^.$ for lines with only one character ^\\.[0-9][0-9] for lines starting with a period and two numbers '"Devic e"' to the word deviceDe[Vv]ice\\. For the word Device or deVice[0-9]\\{2\\}-[0-9]\\{2\\}-[0-9]\\{4\\} Date format dd-mm-yyyy[0-9]\\{3\\}\\.[0-9]\\{3\\}\\.[0-9]\\{3\\}\\.[0-9]\\{ 3\\}For the IP address format nnn.nnn.nnn.nnn[^.*$] match any line

Copyright © Windows knowledge All Rights Reserved