Comments (1)
@fileformat I see you've added XRegExp support in commit e2333b8, and that the XRegExp version of the tester is now live. That's awesome!
A few issues to report about the XRegExp support, though.
Not specific to XRegExp:
- Spaces in the input show up as
+
signs in the results (in the input, replace, split, and exec columns). Spaces are also replaced with pluses in the regex source, which sometimes leads to syntax errors. - The
input.replace
column should be labeledinput.replace()
, for consistency with the other columns. - The
input.split
column should be labeledinput.split()
, for consistency with the other columns. - The
regex.exec()[]
column should be labeledregex.exec()
, unless the split column is labeledinput.split()[]
.
Specific to XRegExp:
- The page should run
XRegExp.install('natives')
when it first loads (if running the XRegExp tester rather than native JavaScript tester), to enable the XRegExp replacement text syntax. Alternatively, you could pass the input throughXRegExp.replace
instead ofString.prototype.replace
, in which case you wouldn't need theXRegExp.install('natives')
line. - The XRegExp flags
s
,x
, andn
are never actually applied, even when their checkboxes are checked. - Remove the option for flag
y
. XRegExp supports flagy
only in JavaScript environments that natively support it (i.e., Firefox 3+). Node.js/V8 does not support flagy
, so it would cause an error if RegexPlanet actually applied it.
Feature requests, specific to XRegExp:
- Display named backreferences in the
regex.exec()
column. To do this, you'd need to loop over properties of the result array. In order for named backreferences to actually show up on the result array, you'd need to either run theXRegExp.install('natives')
line that I mentioned earlier (after loading XRegExp), or pass the input throughXRegExp.exec
rather thanRegExp.prototype.exec
. - Upgrade to the latest build of XRegExp 3.0.0-pre. Even though this is not yet ready for final release, the implemented changes are at release quality, and it is unlikely that any remaining changes will affect RegexPlanet's use of it. By upgrading to v3.0.0-pre, you get several syntax changes:
- Support for the new flag
A
, and its corresponding support for supplementary/astral Unicode code points. - Using multiple groups with the same name is now an error.
- Using the group name
length
or__proto__
is now an error. - Single-letter Unicode categories such as
\p{L}
can now be written as\pL
.
- Support for the new flag
The full list of changes is currently in the roadmap. The release of v3.0.0-final might be delayed for a while since I need to focus on other projects, which is why I think it makes sense to go ahead and upgrade early. Flag A
, in particular, would be very useful to test with.
If you have any questions, I'd be happy to help!
from regexplanet-js.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from regexplanet-js.