-
-
Notifications
You must be signed in to change notification settings - Fork 201
FAQ
- Is there an offline app for regex101?
- How to prefill the fields on the interface via URL?
- How to get / link the latest/newest version of a regex URL or entry?
- How to input control character on regex101?
- How close does regex101 emulate the engines?
- Why is regex101's result different from PHP's for regex specifying non-ASCII character without
u
flag?- Is there a limit on the size of the input fields?
- Is there live help available?
- Will you open source Regex101?
The website utilizes service workers under the hood, which means, if your browser supports them it will run offline. Nothing is stored or required from the server (after the initial load has been made) which means it can run offline without any hiccups. You can see the issue related here: https://github.com/firasdib/Regex101/issues/76
For most of the cases, you should be using permalinks instead. This can be done through the UI or the API. If this still does not suit you, you can prefill the fields using query parameters like so:
https://regex101.com/?regex=<regex>&testString=<text>&flags=<flags>&subst=<replacement>&delimiter=<delimiter>
Note that the content of a permalink will override these flags.
Append /latest
to a regex link rather than the version number. For example: https://regex101.com/r/JvLFcG/latest
You shouldn't test those on an online tester in the first place. There is no support for it, but you can always try to hack it in yourself with a client side script.
From https://github.com/firasdib/Regex101/issues/257
For PCRE, regex101 compiles its library from PCRE 16-bit library, while PHP uses PCRE 8-bit library, so there are discrepancies in non-UTF mode (see the question below). Other discrepancies are caused by differences in regex101's and PHP's implementation of matching and replacement functions.
Known issue: https://github.com/firasdib/Regex101/issues/216
For JavaScript, regex101 uses the browser's regex engine, so you may see different results on different browsers for the same test case.
For Python, regex101 implements it on top of PCRE library, by suppressing features not available in Python. However, there are minor differences which have not been ironed out.
Check the list for known issues.
Why is regex101's result different from PHP's for regex specifying non-ASCII character without u
flag?
It's mainly because regex101 is compiled from PCRE 16-bit library, while PHP uses PCRE 8-bit library. This means that in default mode, the regex and the input are treated as an array of UTF-16 code units on regex101, instead of an array of bytes in PHP.
Unless you are working with binary content, always turn on UTF mode with u
flag to interpret both the regex and the input string as an array of Unicode characters.
Do note that the regex and the input string should be stored in UTF-8 encoding in PHP. Anyway, if you are not already storing string as UTF-8, you should start doing so.
See also https://github.com/firasdib/Regex101/issues/284
On client side, regex101 doesn't impose any limit. You are only limited by your browser and the processing power of your machine.
When you save your regex as permalinks, there is a limit of 64 KB for the regular expression, the test string and the replacement string each. Data beyond the limit will be declined.
From https://github.com/firasdib/Regex101/issues/132#issuecomment-56272586
Feel free to drop in IRC channel at https://web.libera.chat/?nick=regex101-?&chan=#regex
No. I (Firas Dib) have no plan to do that for now.