-
-
Notifications
You must be signed in to change notification settings - Fork 201
Home
- Is there an offline app for regex101?
- How to prefill the fields on the interface via URL?
- How to input control character on regex101?
- How close does regex101 emulates 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?
Since regex101 runs completely on client side, there are a number of third party apps available.
Check https://github.com/firasdib/Regex101/issues/76
For most of the cases, you should be using permalinks instead. Anyway, there is legacy support for this:
https://regex101.com/?regex=<regex>&text=<text>&options=<flags>&sub=<replacement>
From https://github.com/firasdib/Regex101/issues/292
You shouldn't test those on an online tester in the first place. Anyway, you can work around by setting the regex_string
testarea directly in the developer console ($("#regex_string")[0].value = "test\0string\n"
). Which characters are supported depends on the browser implementation, but \r\n
sequence and lone \r
are generally converted to \n
.
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.
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 silently truncated.
From https://github.com/firasdib/Regex101/issues/132#issuecomment-56272586
Feel free to drop in IRC channel at http://webchat.freenode.net/?nick=regex101-....&channels=regex
No. I (Firas Dib) have no plan to do that for now.