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

Generate the SRL for a regular expression

Open francislavoie opened this issue 9 years ago • 6 comments

This would be a killer feature for this project - being able to take existing regex and output a pretty printed SRL expression for it. That would allow verification and and modification of existing regexes much, much easier.

francislavoie avatar Aug 30 '16 00:08 francislavoie

Yes, that would be pretty awesome, but I'm not sure if that's such an easy task. https://regex101.com handles displaying what's happening pretty well, but if someone has the time an knowledge to do so, you're welcome :)

KarimGeiger avatar Aug 30 '16 03:08 KarimGeiger

This would be the most useful feature ever.

+1

Aristona avatar Aug 30 '16 13:08 Aristona

Hi, this may help: https://github.com/JexCheng/regulex SRL and Regulex, are both amazing projects

gbrlmza avatar Aug 30 '16 14:08 gbrlmza

https://github.com/JexCheng/regulex/issues/16

This issue would need to be solved first, regulex doesn't support pcre (php/perl regex)

francislavoie avatar Aug 30 '16 14:08 francislavoie

Could probably reuse Doctrine's lexer to create a regex lexer (potentially separate library with a dependency)

hoshsadiq avatar Aug 31 '16 22:08 hoshsadiq

You guys might want to check out https://www.regextranslator.com/ - they seem to have managed to implement a RegEx to SRL converter. Pretty cool!

KarimGeiger avatar May 25 '18 04:05 KarimGeiger