The reason people avoid regular expressions is ultimately because of the syntax. No indentation, no comments. It might be a minority opinion, but I think the x (EXTENDED) flag should be the default for regex.
@hongminhee@hollo.social
2 replies
@cheeaun@mastodon.social · Reply to 洪 民憙 (Hong Minhee) :nonbinary:
@hongminhee from my viewpoint, it's more like a preference thing; some people like regex, some don't, similar to how some like a language's syntax, some don't (and don't bother learning it).
(I'm pro-regex but most ex-colleagues I've worked with can't understand even a simple line of regex so I don't write them much)
@nyanrus@hackers.pub · Reply to 洪 民憙 (Hong Minhee) :nonbinary:
@hongminhee I agree with that, the regex is convenient but has difficult syntax. I am still getting help of Regexr, a playground for regex. For manipulating string naturally, Ruby language would be good choice.
regexr.com
RegExr: Learn, Build, & Test RegEx
RegExr is an online tool to learn, build, & test Regular Expressions (RegEx / RegExp).
