Haven't tried it since I'd rather not sign up for an account. But regarding this example:<p><pre><code> Minimum eight characters, at least one letter, one number and one special character
>> ^(?=.*[A-Za-z])(?=.*d)(?=.*[@$!%*#?&])[A-Za-zd@$!%*#?&]{8,}$
</code></pre>
I assume the "d" characters here are supposed to be "\d" but the backslashes wandered off somewhere. Not sure if that's just in the example or the actual output from the AI. Some of those special characters like "*" and "$" need a backslash too.<p>Also, this pattern will not allow any character which is <i>not</i> a letter, number, or in that very finite list of special characters - so no spaces, no carets, no quote marks or apostrophes, etc. Not allowing certain printable characters in a password is a bad practice (I won't complain too much if you forbid the non-printable ones).
Not an apple to apple comparison, but if you are trying to regex with help of software, my daily driver of building regex is RegexBuddy [1]. Not only makes building and testing regular expressions easy, but this pretty much covers all the Regex variants in the wild. (And comes with an excellent help file.)<p>The same author also make variant called RegexMagic [2] which probably would have closer premise with AutoRegex (less NN part, perhaps) as it is designed to make Regex without too much knowledge of regex, but I don't know how well it works as I haven't used it much...<p>[1]: <a href="https://www.regexbuddy.com/" rel="nofollow">https://www.regexbuddy.com/</a><p>[2]: <a href="https://www.regexmagic.com/" rel="nofollow">https://www.regexmagic.com/</a>
Hey! I’m the creator of www.autoregex.xyz (@gd3kr on twitter) I originally built it as a small side project in a couple days, I was absolutely not expecting a response this massive. I realise concerns about email and password sign up, and I built it in an hour-ish with firebase auth as a temporary solution to capping the sudden surge in GPT3 requests to the server after the twitter post gained traction. Im working on a better approach to that involving not having to create an account. Otherwise, all suggestions are absolutely welcome. Please tell me how I can make this a better experience for everyone.
Btw, does anyone know a library/program which can reverse engineer a regex from multiple source strings? E.g.<p><pre><code> 14:51 [info] 51 some message
… more of 51 lines …
15:22 [error] 24 error!
… more of 24 lines …
^(\d\d:\d\d) \[(info|error)\] (\d+) (.+)$
</code></pre>
Or maybe not a regex, but a structured pattern.
It is surprising / not surprising to see the lengths people go to not learn regex. There's not much to it. If you're just starting out, find a good reference, and memorize it. Mastery is another thing entirely, but it always is.<p>In *nix land, a decent reference is built-in: `man awk` and jump to the "Regular Expressions" section.
<p><pre><code> All words starting with the letter "n" and ending with "g", case insensitive
>> /^nw*g$/i
</code></pre>
This is not right. That should be a "\w" instead of "w".
I have played with this for a while, and here are some prompts that might be interesting.<p>Prompt: "URL regex"<p><pre><code> ^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$
</code></pre>
Prompt: "Email regex"<p><pre><code> /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))
</code></pre>
This one's weirdly sophisticated for some reason.<p>Prompt: "An HTML tag with a close tag and attributes"<p><pre><code> <([a-zA-Z]+)[^>]*?(?<!\/)>.*?<\/\1></code></pre>
> difficult to […] comprehend<p>You’ll still have to fully comprehend the auto-generated regex to make sure that it really does what you want. So the tool may help with coming up with a suitable regex, but doesn’t remove the need for comprehension.
Tried RegEx → English:<p><pre><code> \"object\": \[(.*?)\]
----
The regular expression matches a string that contains "object": followed by a space and an open bracket, then any characters, then a close bracket. The characters between the open and close bracket are captured in a group.
</code></pre>
Pretty cool.
Did a hobby project a while ago, just the reverse. Wrote a blog post - <a href="https://medium.com/codist-ai/generating-natural-language-description-of-regex-using-deep-learning-679248a95dab" rel="nofollow">https://medium.com/codist-ai/generating-natural-language-des...</a> (colab - <a href="https://colab.research.google.com/drive/1QibOifIJQB2tfLyy_mmw8N9LpchDWnIz" rel="nofollow">https://colab.research.google.com/drive/1QibOifIJQB2tfLyy_mm...</a>)<p>Also gave a pycon talk - <a href="https://www.youtube.com/watch?v=Zugbqg9HFHQ" rel="nofollow">https://www.youtube.com/watch?v=Zugbqg9HFHQ</a><p>It was fun, achieved good result but did not need a monster like GPT3!
Mmm, it produces an expression matching the input? You should put some examples. I'm a noob but AFAIK there are different regex engines out there, which one is this output? I remember trying other regex generators in knime and not working.
I definitely need something like this. My brain seems to insta-delete all Regex knowledge after 1 week.<p>However, why do I need to sign up to test it. I'm guessing there is some paywall after. This feels like that github co-pilot rugpull.
Switch from "regex to english" and write "email".<p>Instead of saying it will match the string "email", it says the opposite, english -> regex conversion<p>> regex = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i<p>> This regular expression is used to match an email address. It starts by matching any character that is not a space or the "@" symbol, followed by the "@" symbol, then any characters that are not a space or the "." symbol, followed by a "." character, and finally any characters that are not a space.
"Something I can use to grep the word list on my Mac to cheat at Worldle. My remaining letters are ...., my green letters thus far are .... and my yellows are ..."
I created Melody (<a href="https://github.com/yoav-lavi/melody" rel="nofollow">https://github.com/yoav-lavi/melody</a>) for the same reasons you've mentioned in the website.
I knew AI would try to replace me one day, but I didn't think it'd be so soon.<p>Kidding of course, looks really cool!
Here's how you can do it without GPT-3 (using BLOOM an opensource alternative) <a href="https://twitter.com/1littlecoder/status/1545818058153140224" rel="nofollow">https://twitter.com/1littlecoder/status/1545818058153140224</a>
This is the kind of use case I’d like to see more of! Less of the p-zombie copywriting neoplagiarism services with pot-luck output, more GPT-as-backend functional apps as productivity multipliers, if that makes sense.
>All words starting with the letter "n" and ending with "g", case insensitive
>> /^nw*g$/i<p>The example regex is completely wrong, it should be /n[a-z]*g/ig
Excellent. Worked for me. The output can modified but this provide a great start. I do regex so seldom I can't remember notation for lookahead for example which this provides.