- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
Matches quoted string, using \" as an escape to place quotes in the string
"test" | "escape\"quote" | "\""
test | "test | "test\"
Author Rating: The rating for this expression. Alessandro Vergani
Your Rating
Bad Good

Enter New Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Is this character class correct?
Name: Elmar
Date: 6/23/2008 7:11:15 AM
Is it possible that the [^"(\\")] bit wants to say, "neither a quote nor an escaped quote"? I don't think you can use grouping constructs like (\\") inside a character class. As it is, it adds the parentheses and the backslash to the character class, which is probably the reason why the regex won't match strings with enclosed parentheses or backslashes, like "(parentheses)", "back\slash".

Title: Not work with some strings.
Name: the DtTvB
Date: 2/10/2007 12:51:28 AM
This pattern won't match these: - "Hello.\nLOL!" - "Hello\\"

Title: doas match (\")
Name: redas
Date: 12/24/2006 4:35:42 AM
I have fixed it a bit like that "((\\")|[^"\\"])*" becouse of * it does match and empty string ""

Title: Does not match strings with brackets
Name: Alex
Date: 10/21/2004 1:57:04 PM
I won't match "test(\")test"

Title: New Regular Expression wanted
Name: Mehdi
Date: 5/13/2003 1:32:03 AM
Hi, It's an excellent website. Thanks for the several Regular expressions. I found a problem in one Expression with description 'Matches quoted string, using \" as an escape to place quotes in the string'. I've tested following matches ["test"], ["escape\"quote"] but didn't response. regards, Mehdi

Copyright © 2001-2018, | ASP.NET Tutorials