Operating System - HP-UX
1825795 Members
2288 Online
109687 Solutions
New Discussion

Re: \n is not available in Extended Regular Expressions

 
SOLVED
Go to solution
Jdamian
Respected Contributor

\n is not available in Extended Regular Expressions

I think that Extenden Regular Expressions (ERE) are more useful than Regular Expression (RE) but I realized that \n is only available in RE, not in ERE.

Is there any reason to remove \n from ERE ?

It would be very useful for me in some awk programs.
1 REPLY 1
Todd McDaniel_1
Honored Contributor
Solution

Re: \n is not available in Extended Regular Expressions

I think you are asking why is \n not in ERE, but IS in the less functional RE?

The best example I can give is that UNIX was written by a few main folks... But many of the tools were written by thousands of folks across the country and almost 20 years of development, well 15 or so.

I have a similar bone with all the various options not matching on different commands...

why isnt -r or -R (recursive) in all cases? IN some cases it is for "reverse"... Same with -f... -f can mean "file" or "follow" as with tail...

Unix is a homogenious OS... but has a few quirks... both we can attribute to the open source nature of it back in the late 60s and 70s....
Unix, the other white meat.