• RandomBit
    link
    English
    61 year ago

    I can’t say this is for me. What I really need is something that will convert one flavor of regex to another. It’s really annoying to always have to look up the shortcuts and capture group syntax.

    • @ajjlyman
      link
      English
      21 year ago

      Yes! I actually had this exact desire years ago, and went searching for it. RegexBuddy does this, best $US 40 I’ve spent. It’ll even do its best to make something that’ll match the same things, even if you’re using features that aren’t technically supported in the target. Don’t worry, it’ll describe exactly what doesn’t work, and why, when it does that.

      For example, if I ask it to convert from C# /(?>atomic) case-(?i)insensitive(?-i) string/ to JavaScript (chrome) it’ll throw out: /(?:atomic) case-[iI][nN][sS][eE][nN][sS][iI][tT][iI][vV][eE] string/, along with the warning:

      Conversion is incorrect because the target application's regular expression flavor doesn't have certain features: JavaScript (Chrome) does not support atomic grouping