9

I'm trying to screen double quotes in regular expression on Google Sheets and there's no luck. A1 cell text = some "name" My formula

=REGEXEXTRACT(A1;"\"(.*)\"")

But Google Docs thinks that i'm using quotes for open /close argument. Please help.

Library that GoogleDocs using for regular expressions is re2

Evgeny Malkov
  • 437
  • 1
  • 5
  • 18

3 Answers3

11

You need to escape a doublequote " with another doublequote like this "".

Try using this,

=REGEXEXTRACT(A1,"""(.*)""")

Verified and this works well.

Pushpesh Kumar Rajwanshi
  • 18,127
  • 2
  • 19
  • 36
1

=REGEXEXTRACT(A1; "[""]+(\w*)")

Evgeny Malkov
  • 437
  • 1
  • 5
  • 18
0

I know it's been a while here, but for anyone else looking for this answer - make sure you're using the right type of quote (Straight quotes vs Smart quotes). Just copy/paste the type of quote you're looking for

Kelsey
  • 9
  • 2