• @Skyrmir
    link
    English
    15 days ago

    So your use cases for regex are when you’re not going to actually fix the problem that caused you to need regex?

    • nickwitha_k (he/him)
      link
      fedilink
      14 days ago

      Modifying software that might not be within the scope of the company that I work for, much less my team, on systems that I explicitly do not have authorization to make such changes on? No, I would not be doing that.

      An important thing to remember is that going all-in on a given tool is going to result in a bad time. You suggestion of SQL, for example, excels in querying and modifying data that lives in a database and follows the expected structures in said database. Most data is not in databases, nor is it structured in a compatible manner, if at all. The workarounds needed to coax SQL into performing such tasks would result in syntax both more arcane and more verbose than the regex necessary to transform it into something compatible.

      Use the right tool for the right job. For transforming semi-structured and unstructured data into something useful in a practical amount of time, regex is frequently the right tool.