this post was submitted on 16 Jul 2023
249 points (92.8% liked)

Programming

17326 readers
150 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] ajjlyman@lemmy.sdf.org 2 points 1 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