Comma should be ignored inside quoted text
See original GitHub issueThe 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:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fyi, we just released https://github.com/mixmaxhq/search-string that fixes this
Here’s a PR: https://github.com/nepsilon/search-query-parser/pull/17