afadil / wealthfolio

A Beautiful Private and Secure Desktop Investment Tracking Application
https://wealthfolio.app
GNU Affero General Public License v3.0
4.38k stars 228 forks source link

Make ticker symbol regexp more tolerant #165

Closed jeromecornet closed 1 week ago

jeromecornet commented 1 week ago

The new CSV import regexp for symbols is too restrictive.

Some symbols are incorrectly recognized as invalid, 2 examples:

I updated the regular expression to handle between 0 and 2 suffixes in - or . to handle the first case I increased the size of the base ticker from 5 to 10 characters to handle the second case

I'm a bit skeptical of the approach to add this regexp rather than lookup an actual symbol from the list of existing symbols (and offer to map unknown symbols maybe), but I'm keeping the change small for now

afadil commented 1 week ago

Thank you @jeromecornet