About grep Regular Expressions in Linux, grep Regular Expressions
Wildcard
* Any character can be repeated multiple times
Any character, repeat once
[] Represents a character
For example, [a, B, c] indicates any one of abc.
Wildcard is used to match
grep or Egrep or awk filters two or more keywords | using grep to match "and" or "or" mode 2011-06-23 14:06
grep or Egrep or awk filters two or more keywords:Grep-e ' 123|abc ' filename/find the line containing 123 or ABC in the file
Quote:
The original post is published by "net player:
For example, in Linux, you can find grep, egrep, and fgrep programs. The differences are roughly as follows:
* Grep:In traditional grep programs, only sentences that conform to the RE string are
Search for a paragraph with a keyword (grep) from the output -- grep-p usageUpdate @ 20170424On Linux we can use below command:Awk 'in in {RS = ORS = "\ n"; FS = OFS = "\ n"}/V403PAA/'pa4.jil==========================================================
You need to keep in mind that regular expressions are not the same as wildcard characters, they mean different things
Regular expressions are just a description of strings and can only be handled by combining tools that support regular expressions.
The first thing to remember is that regular expressions and wildcards have different meanings!A regular expression is only a representation. As long as the tool supports this representation, the tool can process the string of a regular expression.
From: http://hi.baidu.com/nearlove/blog/item/11db98b6b5b8aff831add1e5.html
The first thing to remember is that regular expressions and wildcards have different meanings!A regular expression is only a representation. As long as the tool supports
The first thing to remember is that regular expressions are not the same as wildcards, and they represent different meanings!A regular expression is just a notation, and the tool can handle a string of regular expressions as long as the tool
Regular expressions are not the same as wildcard characters, and they represent different meanings.
The grep command's options are used to supplement the search process. The grep command has a flexible pattern, can be a string, a variable, or a
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.