in reply to Re: Mnemonic for begin/end chars in regexes
in thread Mnemonic for begin/end chars in regexes

I like this one, but I have to admit I would be afraid it could confuse later readers, assuming it is less common than the ^/$ form?

🌸
  • Comment on Re^2: Mnemonic for begin/end chars in regexes

Replies are listed 'Best First'.
Re^3: Mnemonic for begin/end chars in regexes
by hippo (Archbishop) on May 12, 2023 at 22:38 UTC

    I'm pretty sure that usage of \A and \Z is less common than usage of ^ and $. But is usage of \A and \Z also less common than confusion of ^ and $? Probably not.

    If you want to keep other folks in their comfort zone, stick to ^ and $ and learn which is which. If you are just using your own regexen day-to-day on the CLI then use whatever makes you more comfortable.


    🦛