question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Comma should be ignored inside quoted text

See original GitHub issue

The example: require('search-query-parser').parse('test from:"one,two"',{keywords: ['from']}) returns two values, eg from: [ 'one', 'two' ],

I’d think "one,two" should be treated as one word, so it should return from: [ 'one,two' ],

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bradvogelcommented, Oct 3, 2017

fyi, we just released https://github.com/mixmaxhq/search-string that fixes this

1reaction
bradvogelcommented, Nov 20, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

Split a string by commas but ignore commas within double ...
If the component contains one or more comma(s), it must be wrapped with double quotes. * The double quote must not be used...
Read more >
Ignoring Commas in Quotes When Splitting a ... - Baeldung
When processing text containing comma-separated-values, it may be necessary to ignore commas that occur in quoted sub-strings.
Read more >
Read CSV and Parse, but Ignore Comma inside Double Quotes
Yes, you need to parse properly to deal correctly with commas inside quotes. I have not looked at them in detail, but what...
Read more >
No way to ignore comma where a field value is enclosed in ...
I have CSVs where the field is enclosed with quotes only when there is a comma in the content of the field. Such...
Read more >
Ignore comma between double quotes - MSDN - Microsoft
Is there a way to ignore commas which are between double quotes during ... fields with a comma in the text have double...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found