firasdib / Regex101

This repository is currently only used for issue tracking for www.regex101.com
3.21k stars 198 forks source link

It was expected to be timeout but it did not timeout today it was timeout yesterday #2086

Closed RiverLi closed 1 year ago

RiverLi commented 1 year ago

Bug Description

It was expected to be timeout but it did not today it was timeout yesterday. It was timeout yesterday but now it does not throw timeout error. In java 8 application, it still throws timeout error.

Reproduction steps

Flavor Java 8 Regex: ([a-zA-Z0-9._àáÀÁèéÈÉíìÍÌòóÒÓùúÙÚäÄëËïÏöÖüÜÅåæÆœŒØøß:\-](\s*[\/a-zA-Z0-9._àáÀÁèéÈÉíìÍÌòóÒÓùúÙÚäÄëËïÏöÖüÜÅåæÆœŒØøß:\-]+)*) teststr: fn_^^^&&*()%$#@!~ÅåæÆØøßœŒ:-

Expected Outcome

timeout

Browser

Include browser name and version chrome 114.0.5735.106 64 bit

OS

Include OS name and version Ubuntu 20.04

RiverLi commented 1 year ago

([a-zA-Z0-9._ \u00E0\u00E1\u00C0\u00C1\u00E8\u00E9\u00C8\u00C9\u00ED\u00EC\u00CD\u00CC\u00F2\u00F3\u00D2\u00D3\u00F9\u00FA\u00D9\u00DA\u00E4\u00C4\u00EB\u00CB\u00EF\u00CF\00F6\u00D6\u00FC\u00DC\u00C5\u00E5\u00C6\u00E6\u0153\u0152\u00D8\u00F8\u00DF\uFFFD\uFFFD\uFFFD:-](\\s*[\\/a-zA-Z0-9._ \u00E0\u00E1\u00C0\u00C1\u00E8\u00E9\u00C8\u00C9\u00ED\u00EC\u00CD\u00CC\u00F2\u00F3\u00D2\u00D3\u00F9\u00FA\u00D9\u00DA\u00E4\u00C4\u00EB\u00CB\u00EF\u00CF\u00F6\u00D6\u00FC\u00DC\u00C5\u00E5\u00C6\u00E6\u0153\u0152\u00D8\u00F8\u00DF\uFFFD\uFFFD\uFFFD:-]+)*)

working-name commented 1 year ago

Hi @RiverLi

Timeouts happen when your browser isn't done running the regex in the particular engine you selected before Max Execution Time is reached, which is a configurable option. On my end, the example regex and string you gave takes 1 ms to run.

firasdib commented 1 year ago

Since this runs in your browser, it depends on your computer. Perhaps you had more things running yesterday. Either way, if it takes that long to complete, you need to improve your regex.