Regular Expression Wizard

Product Compare Forums Multi-Edit Suggestions Regular Expression Wizard

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #829
    mbourque
    Participant

    Regular Expression Wizard:

    A wizard like interface that walks you thru the creation of a complex regular expression. You would pick from various options until you get the result you want. The user would have an option to test the expression at the end of the wizard, and backup to make changes. The regex string would be dumped into the search dlg field at the end. I imagine an interface similar to MS outlook rules wizard.

    I started to develop this macro many years ago. I think it would be a tremendous addon to MEW. If you dont do it, I probably will finish what I started. Wanted to know what you all thought.

    Regards,

    Michael P. Bourque

    ————————————————————————————-

    Who I am/was:
    I am not sure if anyone remembers me from years back. I do not work for ACI, but I am a huge fan and did write many macros that made it into the shipping product (Block Operations, Tip of the day, Convert Tabs, Select All, etc…)

    I am happy that your all still here, and I look forward to getting back into this community. If you remember me, please drop me an email.

    #3234
    ReidSweatman
    Participant

    Why not do a truly wizard wizard that accepts an English-language description of what you want it to do, and converts it into a regex? Admittedly not a lightweight task, but possible. Essentially, it would have to be a specialized parser with a back-end that either generated a text regex, as you suggested, or went straight to an NFA or DFA, whichever seemed more feasible (and I think most parser folk would answer that pretty much on the one side :) ).

    #3236
    BrentStroh
    Participant

    Now that’s a project. :D

    If it was me, I’d probably write it such that it would grab the current line, and as the regex was built, highlight what was matched. And if I was feeling really adventurous, I’d add a couple of textboxes to display the match groups as well.

    Good luck – this would be a very cool thing to have. It would have saved me much hair pulling trying to figure out what needed to be double-slashed, and what didn’t, in a couple of my goofier projects…

    #3237
    mbourque
    Participant

    Brent,
    This is exactly the spirit to which this project was born. Your idea is not oringally what I was thinking, but its a good idea. I have half of it coded/written, and looking to hear whether I should polish it off. What does MEW software think?

    Now that’s a project. :D

    If it was me, I’d probably write it such that it would grab the current line, and as the regex was built, highlight what was matched. And if I was feeling really adventurous, I’d add a couple of textboxes to display the match groups as well.

    Good luck – this would be a very cool thing to have. It would have saved me much hair pulling trying to figure out what needed to be double-slashed, and what didn’t, in a couple of my goofier projects…[/quote:208ka8ou]

    #3239
    mbourque
    Participant

    Reid,
    This is exactly what I was thinking — and I tried to explain it in my earlier post. Perhaps you never used MS outlook rules wizard — it works as you describe here.

    Why not do a truly wizard wizard that accepts an English-language description of what you want it to do, and converts it into a regex? Admittedly not a lightweight task, but possible. Essentially, it would have to be a specialized parser with a back-end that either generated a text regex, as you suggested, or went straight to an NFA or DFA, whichever seemed more feasible (and I think most parser folk would answer that pretty much on the one side :) ).[/quote:30guos07]

    #3240
    ReidSweatman
    Participant

    No, I have a rather messy set of Outlook rules running right now. That wasn’t the interface I was suggesting. I’d like to be able to type in something like, “Find all functions in the current project that call the function the cursor is currently in,” or “Find the second argument in the next function that returns a reference to an integer,” and have the regex created automatically.

    There used to be a C utility that did pretty much the same thing with any legal C type definition. You could type “Pointer to a pointer to a function that returns float and takes two integer arguments,” and it would spit out the C code that fit the description. Likewise, you could feed it a C type definition you didn’t understand and it would give you a pretty reasonable description in English. Admittedly, that’s a lot easier task than what I proposed. :)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.