Operators

    Parentheses can be used for grouping to specify evaluation order or for calling commands and using the results in an expression.

    • Multiply (*) and Divide (/) and Power (**)
    • Add () and Subtract (-)

    The =~ and !~ operators provide a convenient way to evaluate regular expressions (opens new window). You don’t need to know regular expressions to use them - they’re also an easy way to check whether 1 string contains another.

    • string =~ pattern returns true if string contains a match for pattern, and false otherwise.

    Both operators use .

    1. In the regular expression operators, specify the case-insensitive mode modifier:
    1. Use the str contains command’s --insensitive flag:
    1. Convert strings to lowercase with before comparing: