dart - Regex to match a string ignoring \" -


I currently have this regex

  "[^" *] "  

I'm testing this string again (I'm using it so it has not been encoded yet!)

  "This one The test is \ "text file \" "This is a test \" text file \ ""   

is currently matching it

  " This is an exam \ "" "This is a test" "  

I think it will be the following matches

  "This is an exam \" text file \ "" This is one, basically I match it to something that starts with "and ends", but ignoring anything in the middle \ ", \" "Test file \" test \ ".    

Then the best way to do this depends on the matching capabilities of your regex engine (among them Different support for many different features) are only for a bare-bones Reggae engine, which does not support any back-end capabilities, this is what you want: "([^" * * \\ ") * [^"] * "

This will match a quote, followed by zero or more pairs non-quotes Sequence and \ " sequence, after an essential non-quotation sequence, and finally a final quote.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -