-1

How do I correctly write this in a Windows Powershell? Coming from macOS, I have some problems in understanding what it is wrong with this:

pp -u -g -o Executable -f Bleach="^(AAA_|BBB_|MainScript)" MainScript.pl

The regular expression to be passed to the option -f (filter) is not accepted and fires all sort of errors (command not recognized, and so on, no matter as I try to change it). On a Unix system it works just fine.

Borodin
  • 125,056
  • 9
  • 69
  • 143
Kelly o'Brian
  • 385
  • 2
  • 11
  • 3
    Iinsert `--%` to keep powershell from parsing your parameters. `pp --% -u -g -o Executable -f Bleach="^(AAA_|BBB_|MainScript)" MainScript.pl` See [using --% in powershell](https://stackoverflow.com/questions/18923315/using-in-powershell) –  Jun 24 '18 at 08:23

1 Answers1

0

Escape character for Powershell is `.

Something like this could work:
pp -u -g -o Executable -f Bleach=`"`(AAA_`|BBB_`|MainScript`)`" MainScript.pl`

Tedd Hansen
  • 11,595
  • 14
  • 59
  • 96