Assume I have the following two files:
fileA.pdf
pp_1234_fileB.pdf
If I am to run the following in PowerShell, the file, fileA.pdf is returned.
get-childitem -file -recurse | where-object {$_.Name -match "^(?!pp_[0-9]{4}_).*\.pdf"}
but if I try to do the following similar searches in WSL (Ubuntu), I do not get any files returned:
find -regextype egrep -regex '.*/(?!pp_[0-9]{4}_).*\.pdf'
find -regextype egrep -regex '.*/(?!.*pp_[0-9]{4}_).*\.pdf'
I am an extreme novice with respect to regex on Linux so I'm sure I am missing some sort of syntax mistake. Can you please point out why I'm failing and what a working solution would look like.
Thanks!