On Mon, 15 Jan 2007, wrote: > On 1/15/07, slushpupie at gmail.com <slushpupie at gmail.com> wrote: >> On 1/15/07, Mike Miller <mbmiller at taxa.epi.umn.edu> wrote: >> > I had forgotten that this was about a python regexp. Still, I mostly >> use >> > perl and I am interested personally in understanding this better. I >> can't >> > get it to mess up. For example: >> > >> > # echo 'abcd efgh' | gawk '{print $1"\n\n"$2}' | perl -pe 's/$^/X/ms' >> > abcd >> > >> > efgh >> > >> > What am I doing wrong? I can't figure out how to get "$^" to match >> > anything. >> > > Bah. After a little more careful reading, ^ and $ match just before > and after a newline. Not the newline itself. Therefore it is > impossible to have $^ match anything. Excellent. That is what I thought. So I think you have the best answer so far to the question. Mike