Oracle Regular expression Analysis and digital regularization (1/2)

Source: Internet
Author: User
Tags control characters numeric regular expression

the square Bracket expression shows

Square Bracket Expression

Describe

[[: Alnum:]]

Characters mixed with letters and numbers

[[: Alpha:]]

Alphabetic characters

[[: Cntrl:]]

Control characters

[[:d Igit:]]

numeric characters

[[: Graph:]]

Image characters

[[: Lower:]]

Lowercase alphabetic characters

[[:p rint:]]

Print characters

[[:p unct:]]

Punctuation characters

[[: Space:]]

Space characters

[[: Upper:]]

Uppercase characters

[[: Xdigit:]]

hexadecimal numeric characters

l Meta character

description

TD valign= "Top" "width=" >
align= meta character

*

0

+

1

{m}

m is an integer. It finds exactly m occurrences of the given subexpression in the text

{n}?

The previous string only occurs once when the match

{m,}

m is an integer. It finds at least m occurrences of the given child expression in the text

{N,}?

matches the preceding string at least N Times

< Font face= "Times New Roman" >m and n is an integer. It finds the m n Span Times New Roman '; Mso-hansi-font-family: ' Times Roman ' ">

{N,m}

match the preceding string to at least N times, but not more than m Times

C

Query operations are case sensitive

I

Query operation does not distinguish between flood writing

M

a query on a multiline string that, when the source string contains more than a row, allows the query to be used ( ^ the start of the pattern matching string

N

Usually match a single character or a new row

X

when you need to ignore whitespace characters in a regular expression, use the arguments ' x '

A

Matches the head of a string, not the beginning of the line, so multiple lines of string cannot match each row

D

Match any number of characters

D

Match any non-numeric character

S

Match any white space character

S

Match any non-whitespace character

W

matches any character and number. The difference between the character and [: alnum:] is w including the underscore character

W

Match any non-empty string

*

wildcard characters. Finds records that contain 0 or more occurrences of a given subexpression in the text

+

find out what's included in the text 1 or multiple occurrences of a given subexpression

find out what's included in the text 0 Times or 1 The record that appears with the given child expression

.

Match any character in the text

 ^

Anchor. If the expression after the character appears at the beginning of the line, the match succeeds

$

Anchor. If the expression after the character appears at the beginning of the line, the match succeeds

|

Separator , use methods and or same

(....)

Grouping sub-expressions

Create or Replace function Isnumber (valid_str in VARCHAR2)
return number
Is
Cursor Valid_number is
Select 1 from dual where regexp_like (Valid_str, ' ^[+-]?d+ (. d)? d*$ ');
Isnumber_ Valid_number%rowtype;
Begin
Open valid_number;
Fetch valid_number into Isnumber_;
if (Valid_number%found) then
Close Valid_number;
return 1;
Else
Close Valid_number;
return 0;
End If;
End Isnumber;

Home 1 2 last page
Related Article

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.