Grep Regular Expression note

Source: Internet
Author: User

Grep Regular Expression Note: 20130921 23:49:18 221.179.36.27 http: // dsfafdfessafsdfasdaf/search.htm? Q = % E5 % A5 % B3 % E8 % A3 % 85% E7 % A7 % 8B % E8 % A3 % 85% E8 % BF % 9E % E8 % A1 % A3 % E8 % A3 % 99 & pid = momo_mZPlutzDp9DL30q0-QuSNg & s8safbdo.com 200 46175 A2E08AFDAB132C1800011CSY cmwap 10.114.215.79 GPRS/edge get application/vnd.wap.xhtml + xml; charset = UTF-8 1 NONE Mozilla/5.0 (Linux; U; Android 4.1.1; zh-CN; DXG111_3 Build/JRO03C) AppleWebKit/534.31 (KHTML, like Gecko) UCBrowser/9.2.4.329 U3/0.8. 0 Mobile Safari/534.31 01 63632 52176 1. Search for 1 NONE: grep-Ec '[\ d \ D] * (1 \ s * NONE) [\ d \ D] * 'wk_access.log.20130921v.tmp 2. Search for '01: grep-C' [[: space:] 01 [[: space:] 'wk_access.log.20130921v.tmp involves knowledge points: grep basic regular expressions, extended regular expressions, posix characters in order to keep one to one character encoding in different countries, POSIX (The Portable Operating SystemInterface) added Special Character classes, such as [: alnum:], which is another way of writing a A-Za-z0-9. Put them in the [] sign to become a regular expression, such as [A-Za-z0-9] or [[: alnum:]. In linux, grep supports POSIX character classes except fgrep. [: Alnum:] character [: alpha:] character [: digit:] digit character [: graph:] non-null character (non-space, control character )[: lower:] lowercase character [: cntrl:] control character [: print:] non-empty character (including space) [: punct:] punctuation [: space:] all blank characters (new lines, spaces, tabs) [: upper:] uppercase characters [: xdigit:] hexadecimal numbers (0-9, a-f, A-F)

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.