Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ JavaScript: understanding regular expressions     - C ++ 11 feature: auto keyword (Programming)

- Linux User Rights Study Notes (Linux)

- Ubuntu font settings: Using Windows Font (Linux)

- Linux kernel log --dmesg (Linux)

- Repair Maven project developed default Maven Plugin folder (Linux)

- Linux system started to learn: how to view the contents of the seed on the Linux file (Linux)

- Git Installation and Configuration (Network Agent settings) (Linux)

- Packages with Snort intrusion monitoring light (Linux)

- How to add a new hard disk without restarting the CentOS 7 / RHEL 7 virtual machine (Linux)

- Read and write files efficiently from Apache Kafka (Server)

- MySQL 5.6 Open full query log (Database)

- CentOS7 virtual machine starts appear Permission denied (Linux)

- IPTABLES configuration steps under Linux (Linux)

- OpenJDK 7 compiled under Ubuntu 14.04.3 64-bit (Linux)

- SYN attack hacker attack and defense of the basic principles and prevention technology (Linux)

- Linux LVM Logical Volume Management to resize partitions (Linux)

- C ++ Supplements - locates the new expression (Programming)

- Differential test piece using MongoDB performance YCSB (Database)

- RHEL6.5 replace local YUM source (Linux)

- Analysis of common mistakes when compiling MySQL installation (Database)

 
         
  JavaScript: understanding regular expressions
     
  Add Date : 2018-11-21      
         
         
         
  Use :( Here are some important use metacharacters)

\ S whitespace characters: a space character, \\ s: a plurality of spaces, \\ s +: a plurality of spaces

\ T tab ( '\ u0009')

\ N new line (line feed) character ( '\ u000A')

\ R carriage return ( '\ u000D')

\ F feed character ( '\ u000C')

\ A alert (bell) character ( '\ u0007')

\ B matches a word boundary (located to find a word beginning or end of the match)

\ D: to match the numbers from 0 to 9;

\ W: to match letters, numbers, or the underscore character (a-zA-Z0-9_)

\ E escape character ( '\ u001B')

\ Cx The control character corresponding to x

\ U00A9 is Unicode character

: Match all characters except newline

(To match all characters except newline)

Match string:

var s = 'abc efg';

var r = s.match (/ absc / ig); // => get absc

Convert a string:

s.replace (r, '1') // => var s = '1 efg' successfully replaced

egrep metacharacters

Matches any single character

. Dot matches any single character

[...] Character class matches a single character listed

[^ ...] Negated character set matches a single character that is not listed

Yuan character count feature

? The question mark matches the time allowed, but not necessarily

* The asterisk matches any number of times, it may not match

+ Plus at least one match, at least as many times as possible

{Min, max} interval quantifier requires at least min and at most max times allowed

Metacharacter matches the location

Caret ^ matches the beginning of a line position

$ Dollar sign matches the end position line

\
\> End of a word delimiter matching words

Other characters

| Alternation matches any partition expression

Chinese Regular: / ^ [\ u4E00- \ u9FA5] + $ /
     
         
         
         
  More:      
 
- Oracle 11g maintenance partitions (Seven) - Modifying Real Attributes of Partitions (Database)
- Findbugs installation documentation (Linux)
- OpenSSL: implementation creates a private CA, certificate signing request Explanation (Server)
- Cacti monitoring service Nginx (Linux)
- SSH mutual trust configuration (Server)
- cp: omitting directory error solutions under Linux (Linux)
- Linux system components Detailed log (Linux)
- Debian 7.7 Installation and Configuration (Linux)
- Two kinds of agents of Spring AOP (Programming)
- Linux shell string interception and stitching (Linux)
- Configuring Proxy on a Unix terminal, accelerate Android Studio Construction (Linux)
- TeamCity continuous integration in the Linux installation (Linux)
- Binary tree traversal recursive and non-recursive (cyclic) traversal achieve (Programming)
- Ubuntu upgrade to Linux Kernel 4.2.3 Kernel (Linux)
- Bootable ISO image using GRUB (Linux)
- Configuring automatic mail GAMIT under CentOS system (Linux)
- Mac OS X 10.9 compiler OCI8 module (Programming)
- The basic method RHEL6 (CentOS6) used in the source package compiled RPM: Upgrade OpenSSH articles (Linux)
- Recover Ubuntu 14.04 wakes up from standby in case mouse keyboard appears dead (Linux)
- Python3 multi-thread download codes (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.