Update
This commit is contained in:
parent
3816e78230
commit
1ed9079ad4
50 changed files with 1892 additions and 1863 deletions
2
regex.md
2
regex.md
|
@ -50,7 +50,7 @@ Here we'll demonstrate some practical uses of regular expressions. Most common [
|
|||
|
||||
The most basic use case is you just wanting to **search** for some pattern in a file, i.e. for example you are looking for all [IP addresses](ip_address.md) in a file, for a certain exact word inside source code comment etc.
|
||||
|
||||
The following uses grep to find and count all occurences of the word `capitalism` or `capitalist` (disregarding case with the `-i` flag) in a plain text version of [this wiki](lrs_wiki.md) and passes them to be counted with *wc*.
|
||||
The following uses grep to find and count all occurrences of the word `capitalism` or `capitalist` (disregarding case with the `-i` flag) in a plain text version of [this wiki](lrs_wiki.md) and passes them to be counted with *wc*.
|
||||
|
||||
`grep -i -o "capitalis[mt]" ~/Downloads/lrs_wiki.txt | wc -l`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue