janisdd / vscode-edit-csv

vs code extension to edit csv files with an excel like table ui
MIT License
220 stars 32 forks source link

Ctrl-F regex pattern with capital letters always fails unless match-case is enabled #93

Closed Nu11u5 closed 2 years ago

Nu11u5 commented 2 years ago

What OS?

Description

Normal regex implementations, when the case-insensitive option is used, will match letters regardless of the case of the pattern or content text.

When a search is performed using Ctrl-F in Edit-CSV, if a regex pattern is used that contains a capital letter, this will always fail even if the CSV content text contains the text with the exact same case. The search only works if the case-sensitive option is enabled.

Expected behavior

When the match-case option is disabled, the search returns matching results regardless of the case of either the regex pattern or the CSV content text.

Steps to reproduce

Create the example CSV table and perform the searches as regex patterns.

Example
value1
Value2
janisdd commented 2 years ago

I'll look into this

janisdd commented 2 years ago

Found it... ignore case lower cases the cell value and the search input but the regex missed the i flag.

Fix will ship with the next update