In ORACLE databases, how do I find regular expressions for non-Chinese characters except numbers and letters? oracle Regular Expressions

Source: Internet
Author: User

In ORACLE databases, how do I find regular expressions for non-Chinese characters except numbers and letters? oracle Regular Expressions

Recently, a project has the following requirements: in ORACLE databases, regular expressions for non-Chinese characters except numbers and letters are obtained.
If the following fields exist, replace all the characters except letters, numbers, and Chinese characters with null.
'Asdfsad ,,;)()! @ 123234 # $ % ^ & * (my w is e? Chinese .. /\ []: '"One person'

Final value: asdfsad123234 I am a Chinese user

Select FN_REG_REPLACEOTHER ('asdfsad ,,;)()! @ # $ % ^ & * (I am? Chinese .. /\ []: '"One person",' required regular expression, ') from dual;

Thank you. Do not post the following answers:
(\ S) | (\,) | (\,) | (\.) | (\.) | (\ :) | (\;) | (\ () | (\)) | (\ () | (\ ') | (\ '') | (\") | (\ [) | (\] | (\!) | (\!) | (\ @) | (\ #) | (\ %) | (\ ^) | (\ &) | (\ *) | (\ $) | (\ $) | (\/) | (\?) | (\?))

------ Solution --------------------

Select regexp_replace ('asdfsad ,,;)()! @ 123234 # $ % ^ & * (my w is e? Chinese .. /\ []: '"One person'
, '[[: Punct:] | [: blank:] | [: space:] | [: cntrl:]', '')
From dual
;

REGEXP_REPLACE ('asdfsad ,,;)
-----------------------------

Asdfsad123234 I w is e Chinese

Well, the content of this article ends here, hoping to be useful to everyone.

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.