Linux wildcard and regular expression + notepad ++, wildcard notepad

Source: Internet
Author: User

Linux wildcard and regular expression + notepad ++, wildcard notepad

Http://blog.csdn.net/pipisorry/article/details/24143801

Wildcard(Bash Operation)

In the bash operating environment, there is also a very useful wildcard function, that is, the wildcard (wildcard )! It is easier to process data with bash!

Common wildcard characters


In addition to wildcards, special symbols in the bash Environment


Note:

1. In theory, try not to use the above characters for your "file name"

2. For example, the bash command find can use wildcards.



Regular Expression

A regular expression is a query string that contains general characters and special characters. special characters can be used to expand the search string capability. The function of a regular expression in searching and replacing strings cannot be ignored, it can improve work efficiency.

Special characters in linux Regular Expressions

Note: [: Alnum:], [: alpha:], [: upper:], [: lower:], [: digit:] these must know what it means, because he is more than a-z quit A-Z purposes to be sure!

Characters)


Note:

1. Expression description
\ T tab.
\ N new line.
. Match any character.
| Match the characters on the left and right of the expression. For example, "AB | bc" matches "AB" or "bc ".
[] Match any single character in the list. For example, "[AB]" matches "a" or "B". "[0-9]" matches any number.
[^] Matches any single character out of the list. for example, "[^ AB]" matches characters other than "a" and "B. "[^ 0-9]" matches any non-numeric characters.
* The character on the left is matched any time (0 or multiple times). For example, "be *" matches "B", "be", or "bee ".
+ The character on the left is matched at least once (once or multiple times). For example, "be +" matches "be" or "bee" but does not match "B ".
? The character on the left is matched 0 times or 1 time. For example, "be? "Match" B "or" be "but not" bee ".
^ The expression on the right is matched at the beginning of A row. For example, "^ A" only matches rows starting with ".
$ The expression on the left is matched at the end of a row. For example, "e $" only matches rows ending with "e.
() Affects the order of expression matching and is used as the grouping tag of the expression.
\ Escape character. If you want to use "\" itself, you should use "\\".

2.In the regular expression, \ 1 indicates the Matching content in the first bracket. For example, see.

3.Note that the numeric representation is [0-9] And \ d cannot be used, for example, the number representation in the "find" command-regex parameter.


Notepad ++Application of Regular Expressions

[Use notepad ++ Regular Expressions]

From: http://blog.csdn.net/pipisorry/article/details/24143801

Ref: http://linux.vbird.org/linux_basic/0330regularex.php#basic_regexp


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.