Turbocapitalist |
04-10-2017 01:10 AM |
Quote:
Originally Posted by MBoyle19
(Post 5694997)
I didn't know the exact name they were called. So I called it regex types. Tobyv did mentioned above it was called short hand regex.
Can sed and awk understand shorthand regex?
|
syg00 mentioned them above in #2 and #4. They are perl regular expressions, ported to other languages this is often called perl-compatible regular expression (PCRE). Within perl they are properly called metasymbols and they stand in for some functionality as well as pattern data. You'll find PCRE nearly everywhere these days.
But as to whether sed and awk can understand perl's regular expression metasymbols, the answer is, "no" at least for existing versions to-date.
If you find them useful, then you can get a lot out of one-liners in perl. See the options -e, -i, -n, and -p in
Anything you can do with sed and awk you can do, plus more, in perl.
|