Android SMS Regular expression error

Source: Internet
Author: User

How to extract URLs correctly before and after having Chinese in the backgroundplease help to make the following changesMediatek\frameworks\base\op\java\com\mediatek\op\util\defaultpatterns.javapublic static Pattern Getweburl (final string Engirichar, final string Goodirichar,
Final String Topleveldomainstrforweburlexpand) {
Return Pattern.compile (
"((?:( http|https| http| https|rtsp| RTSP): \\/\\/(?:(?: [a-za-z0-9\\$\\-\\_\\.\\+\\!\\*\\ ' \ \ \) '
+ "\\,\\;\\?\\&\\=]| (?:\ \%[A-FA-F0-9]{2})) {1,64} (?: \ \:(?: [A-za-z0-9\\$\\-\\_]
+ "\\.\\+\\!\\*\\" \ \ \ \\,\\;\\?\\&\\=]| (?:\ \%[A-FA-F0-9]{2})) {1,25})? \\@)? "
+ "((?:(?: [" + Engirichar + "] [" + Engirichar + "\\-]{0,64}\\.) + "//named Host
+ Topleveldomainstrforweburlexpand
+ "| (?:(? : 25[0-5]|2[0-4] "//or IP address
+ "[0-9]| [0-1] [0-9] {2}| [1-9] [0-9]| [1-9]) \\. (?: 25[0-5]|2[0-4][0-9] "
+ "| [0-1] [0-9] {2}| [1-9] [0-9]| [1-9]|0] \ \. (?: 25[0-5]|2[0-4][0-9]| [0-1] "
+ "[0-9]{2}| [1-9] [0-9]| [1-9]|0] \ \. (?: 25[0-5]|2[0-4][0-9]| [0-1] [0-9] {2} "
+ "| [1-9] [0-9]| [0-9])) "
+ "(?:\ \:\\d{1,5}) " Plus option port number
+ "(\\/(?:(?: [" + Goodirichar + "\\;\\/\\?\\:\\@\\&\\=\\#\\~"//Plus option query params
+ "\\-\\.\\+\\!\\*\\" \ \ \ \\,\\_]) | (?:\ \%[A-FA-F0-9]{2}))? "
+ "(?:\ \b|$) "); And finally, a word boundary or end of
Input. This was to the stop Foo.sure from
Matching as Foo.su
    }

Android SMS Regular expression error

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.