SRL-Python icon indicating copy to clipboard operation
SRL-Python copied to clipboard

Parse regex to SimpleRegex

Open soasme opened this issue 7 years ago • 1 comments

The proposal here is to parse and analyse the structure of regex expression to SimpleRegex expression. It was enlightened an email sent by Adalbert Arsen. I endorse this plan because it's quite educative for regex learners & sounds like a good tool to debug complicated regex expression.

soasme avatar Sep 02 '17 23:09 soasme

I see that this issue is about 4 years old now, and I'm not sure if anyone is currently working on this project, but I've written some python and javascript code that does essentially this (it's kind've like a simple compiler). It works in most simple cases (there's just a couple of SRL flags and keywords that aren't implemented) but sometimes has to resort to using the "raw" method where certain meanings can't be translated. There are also cases where I had to translate to a more complicated SRL expression because a simple translation wasn't possible (character classes with a mix of ranges and elements.) Since I've been exploring a lot of potential regex cases I've come across some SRL bugs along the way, I'll open a separate issue for those. Please let me know if you have any interest in collaborating!

Clara-Brandt avatar Jun 23 '21 00:06 Clara-Brandt