I’m trying to find all strings which are local paths like:
@/path/to
@@/path/to
./path/to
../path/to
../../path/to
And at the same time ignore all string, which could be a module like
@next/module
Therefore I use this regexp:
^[./|~/|@/|@@/]
But this also matches the module, which I don’t want to. I thought I have to search for a starting DOT or AT followed by a SLASH should work…
RegEx