in reply to Proper use of //x

1. Do you find /x regexes easier to read/understand, or harder?

Generally harder. Regular expresions are generally a doddle to read, even if you have very little experience (see Lama Glama).

2. Does this "ease of reading" change one way or the other as you gain experience with regexes?

I don't know if it's just me, but I found that regexps quite easy from the start. I had never seen a /x until I saw one in some code I had to work on. It was no easier to read, and there to look flash, rather than improve the code.

3. What kinds of rules should be followed when using /x to ensure the best readability?

I tend to find that if I want to use /x, I should really be doing the job in some more code, not trying to do it in the expression. Code with comments is by far easier to read than a regexp with comments.

--

Brother Marvell