XP is just a number | |
PerlMonks |
Re: grep only lines having matched patternby Discipulus (Canon) |
on Apr 01, 2021 at 09:18 UTC ( [id://11130664]=note: print w/replies, xml ) | Need Help?? |
Hello noviceuser, is not a grep option what you are looking for, but a match to use inside grep If you want to match only lines with 03-15-2021 followed by a space (so not a dash) you can use the regex character class dedicated to space-like stuff. See it in perlrequick#Using-character-classes
L* PS you can practice online using marvellous webperl (already filled with your example, modify the regex with what already suggested) and you can can find other regex practicing tools in my bibliotheca
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|