Blog post: Regular expressions present challenges even for not-so-regular developers

Hi all,

We’ve published a new blog about some of the things that can go wrong in regular expressions:


Regular expressions are a concise and powerful tool for processing text. However, they also come with a steep learning curve and plenty of opportunities to make mistakes.

This is the first in a series of posts about some specific pitfalls of Java regular expressions that can lead to bugs, code that’s hard to understand, or worse: code that could crash your application. In this series we will give you some examples of issues in real code caused by these pitfalls, and discuss strategies (and rules!) for writing better, more readable and maintainable regular expressions. In this post I’ll start with pitfalls related to a very common feature of regular expressions: character classes.

Read the rest in the blog

 
:wink:
Ann

5 Likes

So now it should take you only one second to find a bug in this Elasticsearch code which is commented “defined by RFC7230 section 3.2.6” for this expression:

hey, great blog post. I wanted to just add that we fixed this in elasticsearch thanks to your find:)

3 Likes

Hi @xyz123,

Welcome to the community and thanks for this great update!

Glad you enjoyed the blog, and so happy it was helpful.

 
:smiling_face:
Ann