What is the "^" for in CLI commands?

The ">" output-redirection and the (odd) use of the pipe "|" character are described, but not the caret "^", though it is present in the examples.  What does it do? 
Tagged:

Answers

  • Kurt_MKurt_M Posts: 199 Silver 1
    Hi @shakyknees

    We do have a small snippet in our documentation regarding this:

    The pipe character ( | ) in a regular expression is interpreted as a logical OR. The character must be escaped by the caret character ( ^ ), to prevent the operating system shell from interpreting it as the pipe operator. (Note that if you want to use the caret character itself as part of your regular expression, it must be escaped by a second caret.)

    So essentially, if you are using the pipe character to indicate the OR expression, the carrot must go before it: ^|

    Kind regards,

    Kurt McCormick
    Product Support Engineer, Redgate

    Need help? Take a look at our Help Center

Sign In or Register to comment.