diff --git a/README.md b/README.md index 1985e52..47fe626 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ Notice that nearly every feature below has at least subtle differences from Java - Flags + Flags Supported in top-level flags and pattern modifiers @@ -303,13 +303,22 @@ Notice that nearly every feature below has at least subtle differences from Java Currently supported only in top-level flags + + Digit is ASCII + D + ✅ + ✅ + + ✔ ASCII \d, \p{Digit}, [[:digit:]]
+ + Word is ASCII W ✅ ✅ - ✔ ASCII \b, \w, [[:word:]], \p{Word}
+ ✔ ASCII \b, \w, \p{Word}, [[:word:]]
@@ -438,13 +447,13 @@ Notice that nearly every feature below has at least subtle differences from Java - Character sets - Digit, word - \d, \w, etc. + Character sets + Digit + \d, \D ✅ ✅ - ✔ Same as JS (ASCII)
+ ✔ Unicode by default (≠ JS)
@@ -465,6 +474,15 @@ Notice that nearly every feature below has at least subtle differences from Java ✔ ASCII (≠ JS)
+ + Word + \w, \W + ✅ + ✅ + + ✔ Unicode by default (≠ JS)
+ + Dot . diff --git a/demo/demo.js b/demo/demo.js index b50bdbd..1880522 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -10,6 +10,7 @@ const state = { i: getValue('flag-i'), m: getValue('flag-m'), x: getValue('flag-x'), + D: getValue('flag-D'), W: getValue('flag-W'), }, opts: { @@ -73,6 +74,8 @@ function showTranspiled() { state.flags.m ? 'm' : '' }${ state.flags.x ? 'x' : '' + }${ + state.flags.D ? 'D' : '' }${ state.flags.W ? 'W' : '' }`, diff --git a/demo/index.html b/demo/index.html index 32a05ae..3fb2a36 100644 --- a/demo/index.html +++ b/demo/index.html @@ -35,6 +35,11 @@

Try it

x Insignificant whitespace and comments +