Community Patterns

Community Library Entry

-1

Regular Expression
Created·2021-01-29 07:47
Updated·2021-06-21 14:57
Flavor·ECMAScript (JavaScript)

/
^("([^"]|\\")*?")$|^('([^']|\\')*?')$|^(`([^`]|\\`)*?`)$
/
gm
Open regex in editor

Description

  • Language : Javascript

  • Description : This will helpful for validating contents from a text editor where all the values are string and you need to verify that string must be a single string having quotes around it.

  • Note : This regex is best applicable by trimming the string before checking with this regex

Submitted by PranomVignesh<pranomvignesh@gmail.com>