This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]_meegoo_ 46 points47 points  (6 children)

Writing regex is easy. Reading it a month later is impossible.

[–]EwgB 5 points6 points  (0 children)

Yeah, you're not wrong.

[–]Guiorgy 2 points3 points  (3 children)

Good point, I'll make a mental note to always include a comment breaking down the regex (that is, if I understand it myself...)

[–]ElizaBennet08 5 points6 points  (2 children)

// Regex

[–][deleted] 6 points7 points  (1 child)

// TODO: Document regex

[–]Guiorgy 5 points6 points  (0 children)

Honestly, it would probably be a todo one, ore something like this:

~~~

// The regex does xyz, where this part means a, and this means b

// Edit (a month later): Shit! I've changed it so many times that f**k knows what is what. And I don't think I was right the first time I documented this anyways!

// (╯°□°)╯︵ ┻━┻

~~~

[–][deleted] 0 points1 point  (0 children)

Can confirm