正则字符串开始但不以"

coo*_*kya 5 regex

有没有写,表示与开头的字符串正则表达式的选项"不结束 "

cod*_*ict 7

你可以使用正则表达式:

^".*[^"]$
Run Code Online (Sandbox Code Playgroud)

说明:

^     Start of line anchor
"     A literal "
.*    Any junk
[^"]  Any non " character
$     End of line anchor
Run Code Online (Sandbox Code Playgroud)

  • 大声笑Stackoverflow提供几乎即时的答案.这就像谷歌更难的问题:) (5认同)