汉字正则。熟悉字符集的朋友进。解决方案
汉字正则。。熟悉字符集的朋友进。。
匹配汉字正则分几种情况?
每种情况正则该怎么写?
例如:ASCII编码和UNICODE编码
gb2312 gbk big5如何匹配?取决于服务顺用的什么字库吗?
关于对UICODE编码的匹配,网上给出的正则范围是:
[\u4e00-\u9fa5]
但是我查UNICODE编码表发现:
从3220开始就有汉字了。。
另外\x80-\xff是匹配的ASCII码吗?
请高手给点一下吧。。
或有相关资料让我参考一下。。
不胜感激。。。。。。。
------解决方案--------------------
2E80~33FFh:中日韩符号区。收容康熙字典部首、中日韩辅助部首、注音符号、日本假名、韩文音符,中日韩的符号、标点、带圈或带括符文数字、月份,以及日本的假名组合、单位、年号、月份、日期、时间等。
3400~4DFFh:中日韩认同表意文字扩充A区,总计收容6,582个中日韩汉字。
4E00~9FFFh:中日韩认同表意文字区,总计收容20,902个中日韩汉字。
A000~A4FFh:彝族文字区,收容中国南方彝族文字和字根。
AC00~D7FFh:韩文拼音组合字区,收容以韩文音符拼成的文字。
F900~FAFFh:中日韩兼容表意文字区,总计收容302个中日韩汉字。
FB00~FFFDh:文字表现形式区,收容组合拉丁文字、希伯来文、阿拉伯文、中日韩直式标点、小符号、半角符号、全角符号等。
比如需要匹配所有中日韩非符号字符,那么正则表达式应该是^[\u3400-\u9FFF]+$
理论上没错, 可是我到msn.co.ko随便复制了个韩文下来, 发现根本不对, 诡异
再到msn.co.jp复制了个 'お ', 也不得行..
然后把范围扩大到^[\u2E80-\u9FFF]+$, 这样倒是都通过了, 这个应该就是匹配中日韩文字的正则表达式了, 包括我們臺灣省還在盲目使用的繁體中文
而关于中文的正则表达式, 应该是^[\u4E00-\u9FFF]+$, 和论坛里常被人提起的^[\u4E00-\u9FA5]+$很接近
需要注意的是论坛里说的^[\u4E00-\u9FA5]+$这是专门用于匹配简体中文的正则表达式, 实际上繁体字也在里面, 我用测试器测试了下 '中華人民共和國 ', 也通过了, 当然, ^[\u4E00-\u9FFF]+$也是一样的结果
------解决方案--------------------
mb_ereg_match
------解决方案--------------------
U0000 ASCII.pdf
U0A00.pdf
U0A80.pdf
U0B00.pdf
U0B80.pdf
U0C00.pdf
U0C80.pdf
U0D00.pdf
U0D80.pdf
U0E00.pdf
U0E80.pdf
U0F00.pdf
U1A00.pdf
U1B00.pdf
U1D000.pdf
U1D00.pdf
U1D80.pdf
U1D100.pdf
U1D200.pdf
U1D300.pdf
U1D360.pdf
U1D400.pdf
U1DC0.pdf
U1E00.pdf
U1F00.pdf
U1FF80.pdf
U2A00 扩展数学符号.pdf
U02B0.pdf
U2B00.pdf
U2C00.pdf
U2C60.pdf
U2C80.pdf
U2D00.pdf
U2D30.pdf
U2D80.pdf
U2E00.pdf
U2E80.pdf
U2F00.pdf
U2F800.pdf
U2FF0.pdf
U2FF80.pdf
U3FF80.pdf
U4DC0.pdf
U4E00 中文.pdf
U4FF80.pdf
U5FF80.pdf
U6FF80.pdf
U07C0.pdf
U7FF80.pdf
U8FF80.pdf
U9FF80.pdf
U10A00.pdf
U10A0.pdf
U10FF80.pdf
U13A0.pdf
U16A0.pdf
U19E0.pdf
U20A0.pdf
U20D0.pdf
U25A0.pdf
U27C0.pdf
U27F0.pdf
U30A0 日语片假文.pdf
U31A0.pdf
U31C0.pdf
U31F0.pdf
U0080 拉丁符号.pdf
U0100.pdf
U103A0.pdf
U0180.pdf
U0250.pdf
U0300.pdf
U0370.pdf
U0400.pdf
U0500.pdf
U0530.pdf
U0590.pdf
U0600.pdf
U0700.pdf
U0750.pdf
U0780.pdf
U0900.pdf
U0980.pdf
U1000.pdf
U1100.pdf
U1200.pdf
U1380.pdf
U1400.pdf
U1680.pdf
U1700.pdf
U1720.pdf
U1740.pdf
U1760.pdf
U1780.pdf
U1800.pdf
U1900.pdf
U1950.pdf
U1980.pdf
U2000.pdf
U2070.pdf
U2100.pdf
U2150.pdf
U2190 箭头.pdf
U2200 数学符号.pdf
U2300.pdf
U2400.pdf
U2440.pdf
U2460 数字序号.pdf
U2500 制表符.pdf
U2580 方块.pdf
U2600.pdf
U2700.pdf
U2800.pdf
U2900.pdf
U2980.pdf
U3000 中文标点.pdf
U3040 日语平假文.pdf
U3100 汉语旧拼音.pdf
U3130 韩文拼音.pdf
U3190.pdf
U3200 数字符号 标志.pdf
U3300 单位和时间.pdf
U3400.pdf
U10000.pdf
U10080.pdf
U10100.pdf
U10140.pdf
U10300.pdf
U10330.pdf
U10380.pdf
U10400.pdf
U10450.pdf
U10480.pdf
U10800.pdf
U10900.pdf
U12000.pdf
U12400.pdf
U20000.pdf
U100000.pdf
UA000.pdf
UA490.pdf

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

When working with multiple documents or multiple pages of the same document, you may want to combine them into a single file to share with others. For easy sharing, Apple allows you to merge multiple PDF files into one file to avoid sending multiple files. In this post, we will help you know all the ways to merge two or more PDFs into one PDF file on iPhone. How to Merge PDFs on iPhone On iOS, you can merge PDF files into one in two ways – using the Files app and the Shortcuts app. Method 1: Using Files App The easiest way to merge two or more PDFs into one file is to use the Files app. Open on iPhone

Apple's Live Text feature recognizes text, handwritten notes and numbers in photos or through the Camera app and allows you to paste that information onto any other app. But what to do when you're working with a PDF and want to extract text from it? In this post, we will explain all the ways to extract text from PDF files on iPhone. How to Get Text from PDF File on iPhone [3 Methods] Method 1: Drag Text on PDF The easiest way to extract text from PDF is to copy it, just like on any other app with text . 1. Open the PDF file you want to extract text from, then long press anywhere on the PDF and start dragging the part of the text you want to copy. 2

As a universal file format, PDF files are widely used in various application scenarios, such as e-books, reports, contracts, etc. During the development process, we often need to generate, edit, read and other operations on PDF files. As a scripting language, PHP can also easily complete these tasks. This article will introduce how to use PHP to process PDF files. 1. Generate PDF files There are many ways to generate PDF files, the most common of which is to use the PDF library. PDF library is a tool that generates PDF documents for

We usually receive PDF files from the government or other agencies, some with digital signatures. After verifying the signature, we see the SignatureValid message and a green check mark. If the signature is not verified, the validity is unknown. Verifying signatures is important, let’s see how to do it in PDF. How to Verify Signatures in PDF Verifying signatures in PDF format makes it more trustworthy and the document more likely to be accepted. You can verify signatures in PDF documents in the following ways. Open the PDF in Adobe Reader Right-click the signature and select Show Signature Properties Click the Show Signer Certificate button Add the signature to the Trusted Certificates list from the Trust tab Click Verify Signature to complete the verification Let

In iOS 17 and MacOS Sonoma, Apple added the ability to open and annotate PDFs directly in the Notes app. Read on to find out how it's done. In the latest versions of iOS and macOS, Apple has updated the Notes app to support inline PDFs, which means you can insert PDFs into Notes and then read, annotate, and collaborate on the document. This feature also works with scanned documents and is available on both iPhone and iPad. Annotate a PDF in Notes on iPhone and iPad If you're using an iPhone and want to annotate a PDF in Notes, the first thing to do is select the PDF file

Methods include: 1. Use professional document conversion tools; 2. Use online conversion tools; 3. Use virtual printers.

xmind is a very practical mind mapping software. It is a map form made using people's thinking and inspiration. After we create the xmind file, we usually convert it into a pdf file format to facilitate everyone's dissemination and use. Then How to export xmind files to pdf files? Below are the specific steps for your reference. 1. First, let’s demonstrate how to export the mind map to a PDF document. Select the [File]-[Export] function button. 2. Select [PDF document] in the newly appeared interface and click the [Next] button. 3. Select settings in the export interface: paper size, orientation, resolution and document storage location. After completing the settings, click the [Finish] button. 4. If you click the [Finish] button

Solve the problems encountered in downloading PDF files with PHP7 In web development, we often encounter the need to use PHP to download files. Especially downloading PDF files can help users obtain necessary information or files. However, sometimes you will encounter some problems when downloading PDF files in PHP7, such as garbled characters and incomplete downloads. This article will detail how to solve problems you may encounter when downloading PDF files in PHP7 and provide some specific code examples. Problem analysis: In PHP7, due to character encoding and H
