pipes are no more efficient as regex delimiters. You have it exactly right on your latter guess though, it's a whole lot more readable than
s/[\r\n]/<br \/>/g;You've also guessed right about the brackets. It's a way to specify a group of characters to match without specifying what order they appear in.
In reply to Re: Re: Re: Simple Question for you guys.
by AidanLee
in thread converting carriage returns to <br> tags (was: Simple Question for you guys)
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |