linux regular expressions:
file name: lab3test.txt
Create regular expressions that meet the following criteria. You may use grep or egrep to answer these questions
1.Match only the lines that contain an employee ID (and nothing else) with the format 12345.
A Regular expression followed by {m} matches exactly m occurrences of the preceding expression. The following grep command will display only the number which has 5 digits. grep "^[0-9]\{5\}$" lab3test.txt
if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and i can edit and change the answers if you argue, thanks :)
Get Answers For Free
Most questions answered within 1 hours.