What does the vertical bar | character do in a regular expression?

What does the vertical bar | character do in a regular expression?Category: Introduction to Linux IAuthor "LinuxQuestions"What does the vertical bar | character do in a regular expression?
Linux Questions Staff asked 1 year ago

What does the vertical bar | character do in a regular expression?

  • Separates repetition modifiers
  • Separates alternative patterns that can be matches
  • Redirects input to the command
  • Redirects output from the command

About the author