Regular Expression Worker
Execute Regular Expression Matches on a Node Worker Thread or in a Web Worker.
Regular Expressions can suffer from Catastrophic Backtracking .
A very simple expression like /(x+x+)+y/
can cause your JavaScript application to freeze. This library allows you to run
these expressions in another thread, keeping your application responsive. If they take to long to complete, they are terminated, protecting
your application from locking up.
The playground below allows you to test the worker with different regular expressions and content. It will show you the elapsed time for the the worker to process the regular expression against the content.
Note: The timings shown are rounded to the nearest 1/10 of a millisecond. This is due to the crossOriginIsolated
property. See also: Performance: now() method - Web APIs | MDN.