Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ JavaScript: understanding regular expressions     - Use Visual Studio to compile and use WinGDB remote debugging embedded Linux programs (Programming)

- Ubuntu terminal command - see the port occupied and off (Linux)

- Linux start the process (Linux)

- Deep understanding of C # generics (Programming)

- HTML5 Fundamentals study notes (Programming)

- Iptables principle (Linux)

- Ubuntu 15.04 installed Nvidia Quadro series graphics driver (Linux)

- Arrow keys, backspace key garbled in Python-2.7.5 Interactive Mode under CentOS 5.8 (Linux)

- Two kinds of agents of Spring AOP (Programming)

- Oracle index visible and hidden (visible / invisible) (Database)

- Linux kernel boot to retain large memory method summary (Linux)

- Applications Linux leap second problem caused (Linux)

- How to update the ISPConfig 3 SSL Certificates (Server)

- Struts2 dynamic call DMI and error Solution (Programming)

- Ubuntu UFW firewall settings Introduction (Linux)

- Restore database fault encountered ORA-0600 (Database)

- Bug tracking library after FastJson omitted the decimal point 0 (Programming)

- Install Java JDK 8 in CentOS 7 / 6.5 / 6.4 (Linux)

- Ubuntu Linux use MAC binding against ARP attacks (Linux)

- Kafka + Log4j log implement centralized management (Server)

 
         
  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:      
 
- Using monitoring tool dsniff (Linux)
- Python regular expressions: how to use regular expressions (Programming)
- Linux System Getting Started Learning: rename multiple files in Linux (Linux)
- Linux System Getting Started Learning: Disable HTTP forwarding wget in (Linux)
- Linux, rename the file or folder (mv command and rename command) (Linux)
- CentOS7 installation configuration (Server)
- Oracle 11G using DG Broker create DataGuard (Database)
- Virtualbox virtual machine can not copy CentOS Network (Linux)
- Nodejs complete installation instructions for Express (Linux)
- Android Studio installed in Ubuntu 15.04 (Linux)
- Linux server Php injection prevention (Linux)
- Process monitoring tools Supervisor start MongoDB (Database)
- Intruder tools Knark Analysis and Prevention Linux environment (Linux)
- C / C ++ language variable scope: local variables, global variables, file-level variables (Programming)
- Justniffer installed on Ubuntu 15.04 (Linux)
- Linux support exFAT and NTFS (Linux)
- MySQL common functions summary (Database)
- Download Google Android source code under Ubuntu 4.4 (Linux)
- Linux system started to learn: how to solve the xxx is not in the sudoers file error (Linux)
- How to fix Ubuntu / Mint can not add PPA source of error (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.