Live data from Hacker News

RegExr 2.0

regexr.com

31–40 of 47 posts

Re: RegExr 2.0

#33
post #21

Regex testing is cool, but there are dozens of these kinds of tools and I'd really love to see some other kinds of regex tools - A list generator. Enter a regex, set repetition operator constraints (e.g. ->{0,3}, +->{1,3}, .->[A-Z0-9 ], etc.) and have it exhaustively generate a list of matching strings. This is helpful when you have a regex that matches your test strings, but also to let you know what else* it'll mat…

>- A regex assembler optimizer. Give it a few regexes, have it assemble them into one large regex and optimize it. It's got to do better than just | or'ing all the regexes together. I've seen some work done on using trie variants to do this, but have no idea how far along the work is on this.

That should be unnecessary if your regex engine does the dfa transformation. basically, converts the regexp into a state machine and then it combines all of the branches in the state machine to generate synthetic states that can represent the "superposition" of matching multiple branches. this means your regex (once compiled) will run in bounded memory and max time proportional to the input (iirc)

Re: RegExr 2.0

#34
post #21

Regex testing is cool, but there are dozens of these kinds of tools and I'd really love to see some other kinds of regex tools - A list generator. Enter a regex, set repetition operator constraints (e.g. ->{0,3}, +->{1,3}, .->[A-Z0-9 ], etc.) and have it exhaustively generate a list of matching strings. This is helpful when you have a regex that matches your test strings, but also to let you know what else* it'll mat…

> I'd really love to see some other kinds of regex tools

I'd really love to see a better regex syntax. The current obviously is deficient beyond repair. The tools cannot address the root of the problem.

Re: RegExr 2.0

#35
post #21

Regex testing is cool, but there are dozens of these kinds of tools and I'd really love to see some other kinds of regex tools - A list generator. Enter a regex, set repetition operator constraints (e.g. ->{0,3}, +->{1,3}, .->[A-Z0-9 ], etc.) and have it exhaustively generate a list of matching strings. This is helpful when you have a regex that matches your test strings, but also to let you know what else* it'll mat…

[deleted]

Re: RegExr 2.0

#36
post #21

Regex testing is cool, but there are dozens of these kinds of tools and I'd really love to see some other kinds of regex tools - A list generator. Enter a regex, set repetition operator constraints (e.g. ->{0,3}, +->{1,3}, .->[A-Z0-9 ], etc.) and have it exhaustively generate a list of matching strings. This is helpful when you have a regex that matches your test strings, but also to let you know what else* it'll mat…

> I'd really love to see some other kinds of regex tools I'd really love to see a better regex syntax . The current obviously is deficient beyond repair. The tools cannot address the root of the problem.

http://www.perl6.org/archive/doc/design/apo/A05.html

Re: RegExr 2.0

#37
post #20
post #9

People just cannot do unicode even remotely properly. Just cannot. 𝄞 is one char, not two. привет is matched by \w+. PS there's some advanced stuff but where is basic [[:posix:]] char classes?

Just to make it clear: It does not even support the basic Latin-1 charset correctly. Matching my family-name requires manual intervention. This is sad. It seems a very nice regex page otherwise.

Family name = Grüneis

Re: RegExr 2.0

#38

Why can I not match against "\w*" for instance? It just says "infinite" and does not seem to attempt to match.

Creator here - this is because \w* matches 0 characters, and thus matches infinitely. You can roll over the "infinite" error for details, or look in the help.

Try \w+ instead.

Re: RegExr 2.0

#39
post #9

People just cannot do unicode even remotely properly. Just cannot. 𝄞 is one char, not two. привет is matched by \w+. PS there's some advanced stuff but where is basic [[:posix:]] char classes?

Creator here - we are currently relying on the JS RegExp API, and thus only support features of that engine, which are somewhat limited. In the future, we may support other flavours. We may also add specific errors for more common features that are not supported, as I've already done for lookbehinds.

Re: RegExr 2.0

#40
post #20
post #9

People just cannot do unicode even remotely properly. Just cannot. 𝄞 is one char, not two. привет is matched by \w+. PS there's some advanced stuff but where is basic [[:posix:]] char classes?

Just to make it clear: It does not even support the basic Latin-1 charset correctly. Matching my family-name requires manual intervention. This is sad. It seems a very nice regex page otherwise.

Creator here - can you elaborate? What is your family name? The example in this thread ("Grüneis") matches and displays correctly in all the browsers I've tested.

Are you perhaps trying to use a RegEx feature that is not supported by JS? Currently, RegExr only supports the JS flavour of RegEx.

Post reply on HN