In regular expressions, how do you search for a match for whole word starting with "a", followed by any single letter from "b" to "d", followed by "g"? (use grep to search for this pattern in file test.txt)
Answer
grep -w 'a[b-d]g' test.txt
Question
In regular expressions, how do you search for a match for whole word starting with "a", followed by any single letter from "b" to "d", followed by "g"? (use grep to search for this pattern in file test.txt)
Answer
?
Question
In regular expressions, how do you search for a match for whole word starting with "a", followed by any single letter from "b" to "d", followed by "g"? (use grep to search for this pattern in file test.txt)
Answer
grep -w 'a[b-d]g' test.txt
If you want to change selection, open document below and click on "Move attachment"
5. Regular Expressions that the -w option matches whole words only). Here the expression itself is enclosed in ' quotes for reasons that are explained later. grep -w 't[a-i]e' Matches the words tee , the , and tie . <span>The brackets have a special significance. They mean to match one character that can be anything from a to i . grep -w 't[i-z]e' Matches the words tie and toe . grep -w 'cr[a-m]*t' Matches the words craft , credit , and cricket
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.