Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ JavaScript: understanding regular expressions     - Ubuntu and derivative system users how to install Pinta 1.5 (Linux)

- CV: Linux command displays the progress of the run command (Linux)

- Android developers learning Adapter (data adapter) (Programming)

- Python extension module Ganglia 3.1.x (Linux)

- How to experience Unity 8 Mir on Ubuntu 16.04 (Linux)

- Install and use automated tools Ansible in CentOS 7 (Linux)

- Linux excellent text editor (Markdown, LaTeX, MathJax) (Linux)

- C language sorting instance (select, bubble, insert, binary, fast) (Programming)

- Git bulk delete remote tag (Linux)

- Archlinux installation tutorial (Linux)

- Detailed installation OpenCV2.3.1 under CentOS 6.5 (Linux)

- Eclipse installs support for Java 8 (Linux)

- Linux installed and tested the deployment of Kafka distributed cluster (Server)

- Red Flag Linux Desktop 6.0 hard disk installation guide (Programming)

- How to extend / remove swap partitions (Linux)

- Upgrading to MySQL 5.7 partitioning problem solving (Database)

- Java, extends and implements Usage (Programming)

- Hadoop + Zookeeper NameNode achieve high availability (Server)

- xCAT deployment (Linux)

- Oracle Database asynchronous IO cause slow query response (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] + $ /
- Install Linux Mint 17: 20 things to do (Linux)
- Multipath configuration under Linux (Linux)
- Fundamentals of the Java virtual machine memory management principles (Programming)
- jQuery update the content and method of use 3.0 (Programming)
- Oracle Character Set Summary (Database)
- Hadoop 2.5 Pseudo distribution installation (Server)
- PHP 7.0 Upgrade Notes (Linux)
- Linux remote connectivity tools -OpenSSH (Linux)
- Solaris 10 installation configuration mrtg monitoring system (Linux)
- Linux system - The understanding cpu load (Linux)
- Linux / Unix: chroot command examples to explain (Linux)
- CentOS 6.5 minimal installation and configuration VMware tools (Linux)
- Learning how to teach safety system to prevent your own IP leakage (Linux)
- ElasticSearch basic usage and cluster structures (Server)
- Linux Network Programming --epoll model Detailed principles and examples (Programming)
- S5PV210 development board for embedded development environment to build under Ubuntu (Linux)
- iTerm - let your command line can also be colorful (Linux)
- Java Database Programming JDBC configuration (Programming)
- Java singleton mode (Singleton mode) (Programming)
- CentOS 6 compiling httpd-2.4.10 (Server)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.