Start and end of line anchors in middle of regexp

"[email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
I am trying to understand the working of ^ and $ in the middle of a regexp with gnused 4.2.1. The help file says they are considered as normal characters (except at start and end of sub expressions).
 

 This can be checked with (xa^by in input.txt):
 

 sed -n -e "/a^b/p" input.txt
 sed -n -e "/\(a^b\)/p" input.txt
 

 However when using the -r switch, none of the previous commands work as expected:
 

 sed -r -n -e "/a^b/p" input.txt
 sed -r -n -e "/(a^b)/p" input.txt
 

 
 This is puzzling. Am I missing something?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.