Reputation: 3307
I want to write a regular expression in F# that represents strings which start & end with " and can have any sequence of Unicode characters not including double quote or newline.
For example:
"I want to go home"
"My name is cookya "
""
How can I do it?
Upvotes: 1
Views: 633
Reputation: 72656
You should use a regular expression like the following :
let regex = "^\".*\"$"
Upvotes: 3
Reputation: 11182
Ty this
"[^"]*?"
It could work, but parsing and validating this kind of string you might need a stack
.
Upvotes: 0