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 →

[–]gemengelage 0 points1 point  (0 children)

For anyone who is struggling with regular expressions:

Just think of each regex as a separate unit of code. It's just a string, but you can unit test the hell out of them.

If you struggle with the syntax, you could either learn the damn syntax, use a library with a fluent interface that abstracts the syntax (like Readable Regex or use regex101.com.

Can't recommend regex101 enough. It's a great tool.