A regex can be difficult to parse, especially if it is very involved, but in Perl at least, there are ways to make it much easier ( using the /x modifier, for example : https://perldoc.perl.org/perlre#%2Fx-and-%2Fxx ). Comments and and having the regex itself be multiline can make things better, especially if you are creating a particularly complicated one.