in reply to Proper use of //x
2.) Does this "ease of reading" change one way or the other as you gain experience with regexes?
I think that regexp cant be read at all like regular code (or at least I cant). When reading code I have long since stopped seeing the specific commands and instead look at the flow and interpolate. Just as when reading english I dont think I see all the words my brain just rushes over them filling in the details later. With regexps there seems to be no easy way to do this. I just sit down and read them statement by statement backfilling as required. It gets quicker, because I dont need to refer to a manual now *grins*.
3.) What kinds of rules should be followed when using /x to ensure the best readability?
Personally I dont use them at all often, the only time I would has already been listed in the thread, that being to break up regexp's that > 80 chars. I get quite cross if any code line is > 80 chars.
--
Zigster
|
|---|