In the recent retrieval work, the user needs to input the request and return the result. Because it is difficult to predict the user's input content, if no filtering is added, an exception may be thrown during the retrieval phase.
User input may have different styles. The most common is the input with various punctuation marks. How to filter?
I saw a post on the csdn Forum. After combining it, I got the following regular expression, which may help yo
In the process of document processing, people often encounter problems such as the conversion of full text punctuation, full-width alphabetic conversion, uppercase and lowercase conversion, and so on. Although simple, but very cumbersome. Is there any way to change it in batches? Here's how to use EmEditor to change the whole corner of the alphabet punctuation.
EmEditor (Text editor): http://www.xp85.com/h
Due to the need for naming in the code, I have compiled a common Chinese-English table of punctuation marks.
Punctuation in Chinese and English tables
Symbol
English
Chinese
.
Period or full stop
Period
,
Comma
Comma
:
Colon
Colon
;
Semicolon
Semicolon
。
Exclamation mark
Exclamation
I received an email alert from my neighbour (Wealink) and told me I had a new email.Landed in a look, oh yes, the ad Mail said.
After deleting the message.See the top of a small message: "New features travel."
Glancing at the past, a little puzzled, and then swept back a look, "new features on business"?What do you mean, shrimp? New features "How Can" travel?
Think carefully, oh, originally should be:"new function: Travel"!
Even if you add a punctuat
This article mainly introduces the PHP implementation of the punctuation mark is replaced by a blank space method, combined with an example of PHP for the symbol of the regular matching related operation skills, the need for friends can refer to, hope to help everyone.
The results of the operation are as follows:
Chinese Chinese abcdefgh Chinese ijklmnopqrstuvwx Chinese yzabcdefghi Chinese jklmnopqrstuvwxyz Chinese Wenwenwenwen
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a Canal:panama" is a palindrome."Race a Car" is a palindrome.Note:Are you consider that the string might is empty? This was a good question to ask during a interview.For the purpose of this problem, we define empty string as valid palindrome.is mainly the boundary of the judgment, empty string is considered a palindrome stringNon-recursive programClass Solutio
Punct = set (u"":!),.:;?]} ¢ ' ",. 〉》」』】〕〗〞︰︱︳﹐?﹒﹔﹕﹖﹗﹚﹜﹞! ),. :;? |}︴︶︸︺︼︾﹀""﹏?~¢々‖? ˇˉ―--′ ' "([{£¥ ']" ‵〈 "" "" "(〖 ([{£¥〝︵︷︹︻︽^""﹙﹛﹝ ... " " )# to Str/unicodeLambda'. Join (filter (Lambda not inch punct, S)) # to List Lambda l:list (filter (lambda not in punct, l)) Pure python solution for removing punctuation in text
symbols
How to use
+
search Google + page or blood type Example: +chrome or ab+
@
Find social Tags Example: @agoogler
$
Find price Example: Nikon $
#
Find popular # tags to search hot topics Example: #throwbackthursday
-
Add a short cross before a word or site to exclude the site that contains the information in the search results. This method is especially useful when searching for wo
Changing the tag interval from a space to an English comma makes it inconvenient for webmasters who often use original articles because we always like to use full-width commas when entering Chinese characters, is there a way to use a JS script to convert the input Chinese comma into an English comma? Of course! In this way, you do not need to switch the input method to enter a comma when entering the tag.The following is the modification method:Edit and open the/Dede/templets/article_add.htm fil
When I read "Operating System: design and implementation" today (25th page of the English version of the second edition), I saw a previously unknown phenomenon: in English, it is required that most punctuation marks must be written in quotation marks, even if this is logically incorrect. For example:
In our example, argv [0] wocould point to the string "CP ."
In fact, the quotation marks should only contain the "CP" character. The ending period is a
Symbol
Chinese name
Application examples
English name
‘
Apostrophe, corner symbol
A ', F ' (X)
Prime
‘‘
Skimming, two apostrophes
A ', F ' (X)
Double Prime, Prime prime
-
Hyphens
Class-based
Hypen
RefWikipedia--punctuation: http://zh.wikipedia.org/wiki/%E6%A0%87%E7%82%B9%E7%AC%A6%E5%8F%B7Wiki--Corner sy
JS implements string processing, as follows: The letter becomes the adjacent letter, the punctuation is unchanged, the result if the vowel letter is uppercase, Z becomes a.
the display, a Chinese character or a Japanese-Korean length of 1, an English character length of 0.5** @param string s need to get length strings* The string length obtained @return int*/public static double GetLength (String s) {Double valuelength = 0;String Chinese = "[\u4e00-\u9fa5]";Gets the length of the field value, if it contains Chinese characters, the length of each Chinese character is 2, otherwise 1for (int i = 0; i Get a characterString temp = s.substring (i, i + 1);Determines whet
Use regular expressions to remove all punctuation in a string
Copy Code code as follows:
Extracting HTML Chinese text with regular expressions
Copy Code code as follows:
Regular expressions that match any character, including both English and any punctuation
Regex: \\w*|\\w*| [\\u4e00-\\u9fa5] This expression matches an arbitrary Chinese-English character.Where: \w:a word character: [a-za-z_0-9] (matches a word character); Where: \w:a non-word character: [^\w] (match a non-word character); Where: [\\u4e00-\\u9fa5]: Match a Chinese character;
ref:http://saltdstar.iteye.com/blog/1041690Ref:http://www.jb51.net/article/1
Finishing staff: Anchor
Finishing Date: Date
I find it unfamiliar to many symbols, but sometimes it is necessary.
Search engine searched for a few and did not search the complete, so collated a copy for inspection.
Welcome to correction, also welcome to add.
Common punctuation
English name
Chinese name
symbols
pronunciation
Chinese Approximate pronunciation
Leftparen
Opening parenthesis
(
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.