Open eromoe opened 6 years ago
It seems interesting. your idea is to allow raw regex to be inserted then have it displaying hints of what it would match?
My purpose is to organize complex regex code more human readable. I think crocs is easy understand for regex beginner, reuse some regex to construct a new regex, and intuitive to organize regex code.
About display hints of raw regex , I think it may be difficult , however there is a project https://github.com/asciimoo/exrex
I see. Yes that is a great idea. Instead of having regex code snippets just have a library of functions that map to regex. is it? Then one could even share it on pypi.
I think this project is good for group many pattern together, for beginers .
\d
,\s
,\S
,?
. It is no need to write all easy pattern in crocs way, just plain regex string is easy understand.Now, crocs would escape all https://github.com/iogf/crocs/blob/a7098ae9bf9e0955373008ae8b92de29ea0dc578/crocs.py#L29
For example:
Here, 1 and 3 would not work.