regex - Dart says Regexp has invalid quantifier, but it works in JavaScript - a bug? -


itemprop = "text">

I have a regular expression:

  color: \ s * + ((?! ?: Transparent | inherits) (:;?? $)) [^ @;] [^;] *;?   

is apparently working on regex1010.com

But if you take the dart to the expression, for example, if you paste this code:

  void main () {newRegExp (r) "Color: \s * + (?! (?: Transparent | inheritor) (?:; | $)) [^ @] [^;] *;? " ); }   

We are in:

  InternalError: neither came exception: FormatException: invalid regular expression pattern: color: \ s * + ((?:? ! inherit transparent |) (:;? | $)) [^ @;] [^;] * ;, syntax error: invalid quantifier $.wrapException@blob: 98,037,409-a6ed-4af3-b17a-97b022530853: 218: 5 $ ?. ThrowExpression @ blob: 98037409-a6ed-4af3-b17a-97b022530853: 223: 3 $ JSSCXTXMMnetWeb: 98037409-A6D-4AF3-B17A-97B022530853: 411: 3 $. Jesssianaksaksakspi $ 9 BLOB: 9803740 9-A6 D-4 F-3-B-17A -97b022530853: 399: 3 $.main@blob: 98,037,409-a6ed-4af3-b17a-97b022530853: 148: 3 @blob: 98,037,409-a6ed- 4af3-b17a-97b022530853: 515: 5 @blob: 0dee36e0-efe3-40e2- 93f5-4fac9fc4fec3: 1:? 61   

There may be some or maybe a dart bug somehow something is wrong with my regular expression

you below regex instead of your,

  ^ color Can try *; $   



Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -