Commit Graph
2 Commits
Author SHA1 Message Date
Nadya f7ec570040 Cleaner regex
This doesn't change any valid matches but does remove some unnecessary cruft. 
Thanks to MegaScience for the second pair of eyes.
2022-07-16 21:29:27 -07:00
Nadya 92c6a77cf8 Regex adjustment for valid paths
This makes further adjustments to the Regex to allow for valid Windows and Linux paths.
- Valid Windows paths can necessarily contain spaces and hyphens as the game's installation path contains both. (eg. `\SquareEnix\FINAL FANTASY XIV - A Realm Reborn`) so a check for `\w` is insufficient
- Valid Linux paths can also be double-slashed (eg. `/path//to//file`)

In addition some pointless optimizations were made by making the groups non-capturing, lazy matching, and including an ending anchor. Because a valid path must necessarily include at least one valid character `*` was changed to `+`.
2022-07-16 19:20:40 -07:00