An integer with optional plus or minus sign |
^(\+|-)?[0-9]+$ (may use [-+]? as well) |
Double-quoted strings, with no nested double quotes |
"[^"]*" (matches the empty string "") |
Double-quoted strings, with Fortran-like nested quotes |
"([^"]|"")*" |
Double-quoted strings, with C-like nested quotes |
"([^"]|\\")*" (bugged! Why?) |
"(\\"|[^"])*" (better, but still flawed) |
"(\\"|[^"\\])*" (works, but inefficient) |
"([^"\\]|\\")*" (works efficiently!) |
Double-quoted strings, with other escaped characters |
"([^"\\]|\\.)*" (but not escaped newlines) |
"([^"\\]|\\(.|\n))*" |