Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Freeze in regex parser #1814

Closed
e5l opened this issue Jul 18, 2018 · 3 comments
Closed

Freeze in regex parser #1814

e5l opened this issue Jul 18, 2018 · 3 comments
Assignees

Comments

@e5l
Copy link
Member

e5l commented Jul 18, 2018

Failed to match the following regex:
(([a-z]|\d|[\Q+-.\E])+)\Q://\E((([a-z]|[A-Z]|\d|[\Q$-_.+\E]|[\Q!*'(),\E]|(\Q%\E(\d|[A-F]|[a-f])(\d|[A-F]|[a-f]))|[\Q;?&=\E])+)(\Q:\E(([a-z]|[A-Z]|\d|[\Q$-_.+\E]|[\Q!*'(),\E]|(\Q%\E(\d|[A-F]|[a-f])(\d|[A-F]|[a-f]))|[\Q;?&=\E])+))?\Q@\E)?(((([a-z]|[A-Z]|\d|(([a-z]|[A-Z]|\d)([a-z]|[A-Z]|\d|\Q-\E)*([a-z]|[A-Z]|\d)))\Q.\E)*([a-z]|[A-Z]|(([a-z]|[A-Z])([a-z]|[A-Z]|\d|\Q-\E)*([a-z]|[A-Z]|\d))))|(\d+\Q.\E\d+\Q.\E\d+\Q.\E\d+))(\Q:\E(\d+))?(((\Q/\E([a-z]|[A-Z]|\d|[\Q$-_.+\E]|[\Q!*'(),\E]|(\Q%\E(\d|[A-F]|[a-f])(\d|[A-F]|[a-f]))|[\Q;&=\E])*)+)(\Q?\E(([a-z]|[A-Z]|\d|[\Q$-_.+\E]|[\Q!*'(),\E]|(\Q%\E(\d|[A-F]|[a-f])(\d|[A-F]|[a-f]))|[\Q;&=\E])*))?(\Q#\E(([a-z]|[A-Z]|\d|[\Q$-_.+\E]|[\Q!*'(),\E]|(\Q%\E(\d|[A-F]|[a-f])(\d|[A-F]|[a-f]))|[\Q;&=\E])*?))?)?
on string: https://hacker-news.firebaseio.com/v0/topstories.json

@ilmat192 ilmat192 self-assigned this Jul 18, 2018
@qwwdfsad
Copy link
Contributor

I think it may be related to https://youtrack.jetbrains.com/issue/KT-25473

@e5l
Copy link
Member Author

e5l commented Jul 18, 2018

Yep, it may be, but the behavior is different(freeze vs match fail).

@olonho
Copy link
Contributor

olonho commented Aug 8, 2018

#1852 shall help.

@olonho olonho closed this as completed Aug 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants