Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting existing regex pattern to VerbalExpressions? #80

Open
giorgio79 opened this issue May 27, 2015 · 11 comments
Open

Converting existing regex pattern to VerbalExpressions? #80

giorgio79 opened this issue May 27, 2015 · 11 comments

Comments

@giorgio79
Copy link

Hello,

Can I feed a regex pattern to verbal expressions, and get back the verbal express representation?

@jehna
Copy link
Contributor

jehna commented May 27, 2015

Not at the time

@jehna
Copy link
Contributor

jehna commented Jan 5, 2016

@ahmadalibaloch regarding tot the duplicate issue:
Ihis is an interesting issue to tackle. How would you think you'd convert the existing regular expressions? I'd think of couple of ways:

  • Command-line tool
  • Web interface

What do you think?

@vielmetti
Copy link

I'd like to see a command line tool to do this, and if you have an existing tool that parses regexes then recasting them into verbal expressions should be straightforward.

@SignpostMarv
Copy link
Contributor

re-use this?

A few assumptions:

  • I'm going to hope we can that the tree generator in regexper-static can be adapted to build a VerbalExpressions call stack that reproduces the same output.
  • I think we're talking about chaining methods, not instantiating objects? i.e. outputting a series of javascript calls instead of just parsing the regex to pre-populate the properties.
  • If we're going with chaining methods, then for unit testing purposes I would think it's important to stress that if we take a VebalExpressions chain, convert it to a regex string, then back to a VerbalExpressions chain, producing an identical call stack is not required, only that the regex output is identical.

@ahmadalibaloch
Copy link

For my existing files I would like to have a command line tool or a plug-in for VS, notepad++ or other IDEs to replace exisitng RegExpressions to VerbalExpressions. If we can have a web interface for quick solution that is also good.

@aadrian
Copy link

aadrian commented Oct 6, 2016

It's not important how such a tool would look: web based, console based, desktop based, etc.

It's important that exists in first place, as most users having existing regular expressions won't convert them to VerbalExpressions unless there's such a tool that can do the job.

@jonaspm
Copy link

jonaspm commented Jun 17, 2020

Hello,

Can I feed a regex pattern to verbal expressions, and get back the verbal express representation?

That would be nice, indeed.

@shreyasminocha
Copy link
Member

shreyasminocha commented Jun 17, 2020

Post-v2, this should be relatively easy with a library like regexp-tree since we could just map AST nodes to library methods.

@yuenhy
Copy link

yuenhy commented Jan 23, 2024

+1 to this, want to be able to switch between a formula for power users and a verbal expression for every day use

@jehna
Copy link
Contributor

jehna commented Jan 23, 2024

Have you tried using ChatGPT? 3.5 seems to know the context pretty well, maybe 4 would be even better, especially if you could give the documentation as context 🤔
IMG_5944

@yuenhy
Copy link

yuenhy commented Jan 24, 2024

was kinda hoping to switch between the two programmatically but yes chatgpt seems to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants