Regex doesn't omit quotes when matching text in quotes

后端 未结 3 612
长发绾君心
长发绾君心 2021-01-24 01:57

I\'m trying to do a non-greedy capture of text inside double quotation marks with regex in node.js. Most of the Google results say I should use one of these:

\"         


        
3条回答
  •  醉梦人生
    2021-01-24 02:24

    You can give this a shot. This should include everything in the quotes but not the quotes themselves -

    /(?<=")[^" ]*(?=")/ 
    

提交回复
热议问题