Regular Expression metacharacters in Shell

Source: Internet
Author: User
  1. '.' Matches any character

  2. '*' Specifies that * can be used repeatedly for any number of times.

  3. '^' Starts with a string

  4. '$' String end

  5. '. *' Any number of characters

  6. '\' Escape Character

  7. '[...]' Matches any character

  8. '[^...]' Does not match any character.

  9. '\(.... \) 'Indicates matching characters, which are subsequently referenced by escape sequences, for example \ (grep \). * \ 1, matching two grep characters with any number in the middle

  10. '\ N' repeats the nth pattern in \ (... \).

  11. The X \ {M, N \} interval expression matches the number of occurrences of the X character. X \ {n \} indicates that X appears n times, and X \ {M, \} indicates that X appears at least m times,

    X \ {M, N \} indicates that at least M appears, at most N times

  12. '\ <... \>' Matches the start and end of a word.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.