Reputation: 3307
Is there an option to write a regex that represents strings that start with "
and don't end with "
?
Upvotes: 7
Views: 5911
Reputation: 6213
There you go:
^".*[^"]$
^" starts with "
.* some chars (or none)
[^"]$ doesn't end with "
Upvotes: 3
Reputation: 455350
You can use the regex:
^".*[^"]$
Explanation:
^ Start of line anchor
" A literal "
.* Any junk
[^"] Any non " character
$ End of line anchor
Upvotes: 9