Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ JavaScript: understanding regular expressions     - Some Linux networking tools you might not know (Linux)

- Method under Linux GCC Compiler shared library function export control (Programming)

- What Java 8 fastest garbage collector (Programming)

- To install the latest version of the EPEL on CentOS 5.x or 6.x (Linux)

- How to run Docker client in Windows operating system (Linux)

- Magical Virtualbox under Ubuntu (Linux)

- How to download GOG games in Linux command line (Linux)

- To_explore Linux system boot process (Linux)

- Try to use Lets Encrypt (Linux)

- The method of MySQL two kinds of incomplete recovery (Database)

- Use the DBMS_SCHEDULER package to manage scheduled tasks (Database)

- After installing Ubuntu 15.04, to do a few things (Linux)

- ASM Disk Space Check (Database)

- Using Linux command line and execute PHP code (Programming)

- What is Java EE (Programming)

- Source install Python3.4 on CentOS (Linux)

- CentOS boot image to achieve semi-automatic installation (Linux)

- Linux program analysis tool: ldd and nm (Linux)

- Talk about Java in the collection (Programming)

- CentOS NAT iptables (Linux)

  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] + $ /
- C ++ why we chose to use the smart pointer (Programming)
- Dialogue UNIX:! $ # @ *% (Linux)
- Command filter MySQL slow query log (Database)
- TNS-03505 name could not be resolved (Database)
- MongoDB in bulk timestamp change the date format (Database)
- Echo Command Examples (Linux)
- Ubuntu font settings: Using Windows Font (Linux)
- To batch create users under Linux (Linux)
- Android child thread really do not update UI (Programming)
- Ubuntu install video playback software SMPlayer (Linux)
- Oracle 11g upgrade PSU detailed steps (Database)
- SELinux security permissions HTTP + PHP service changes (Server)
- Chkconfig set boot start under Linux (Linux)
- Linux server dual-card dual-IP and single-card dual-IP configuration method (ReHat / CentOS) (Server)
- Linux Network Programming --epoll model Detailed principles and examples (Programming)
- Win8 mount disk partitions under Ubuntu (Linux)
- Three kinds of implementation model of the Linux thread history (Programming)
- CentOS6 installation configuration rsh (Server)
- Orabbix binding Python send graphical reports (Linux)
- HTML5 Fundamentals study notes (Programming)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.