in reply to Re^3: Question about regex.
in thread Question about regex.
I get a bit touchy about white space. Many of my work mates eschew spaces wherever possible and at the other extreme I see stuff like function( param1 , param2 , param3 ); which hurts my brain almost as much as no spaces. My rule of thumb is to use white space where possible as you would for prose on the basis that that is what we are most used to parsing so we get a fair bit of the parsing work essentially for free.
Interestingly regexen are something of an exception for me. Unless they are fairly complicated I don't use /x. When I do use /x I often break the regex up over several lines and comment each part. Mostly though I keep the regexen fairly simple and do complicated stuff where it's easier to maintain.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Question about regex.
by haukex (Archbishop) on Sep 30, 2020 at 07:17 UTC | |
|
Re^5: Question about regex.
by hippo (Archbishop) on Sep 30, 2020 at 09:03 UTC | |
by haukex (Archbishop) on Sep 30, 2020 at 09:59 UTC |