Month: July 2012

  • Do you write readable regexes?

     Why not? Imagine you have a regex to validate a password ^(?=.*\p{Lu})(?=.*\P{L})\S{8,}$  Thats not too complicated, but the readability could be better. The solution here is the option x or IgnorePatternWhitespace. Most regular expression flavours allow you to use the option x, this is an important option everybody should know, who want to write longer patterns. […]