Filter out the punctuation marks in the string. in development, we may encounter this situation, that is, remove a character from the string.
PHP code
@ Test public void test () {String d = trimPunctuation2 ("Hello oewefo, 21.2 !; :, 1? Dsf "); System. out. println (d);} // filter out the punctuation marks in the String public static String trimPunctuation2 (String str) {String punct [] = {",",". ","! ","?
Can be written like this string @" [\u4e00-\u9fa5]| [\(\)\《\》\——\;\,\。 \ "\" \";The first half represents the matching Chinese characters, and the second half is the punctuation that needs to be matched.OtherFor the processing of HTML source code, it is recommended to use Htmlagilitypack, with the following code to remove the script, style or comment content. Public StaticHTMLDocument Initializehtmldoc (stringhtmlstring) { if(string. IsNullOrEmpty
PHP Regular expressions that allow numbers, letters, and punctuation
, the following is allowed numbers and letters. But punctuation doesn't know how to write.
if (Preg_match ("/^[0-9a-za-z_]{6,16}$/", $password)) {
Pass
}else{
Cannot pass
}
Reply to discussion (solution)
/^\s+$/Non-whitespace characters contain symbols.
/^[0-9a-za-z_,]{6,16}$/
/^\s+$/Non-whitespace characters contain symbols.
Ca
Punctuation is not good. Why can't I see it? nbsp; echo nbsp; " lt; a nbsp; href = '../video_show/v_show.php? Tid = ". $ row_Recordset1 ['CT _ id'] gt ;. "' gt ;". $ row_Recordset1 ['CT _ title']. " lt;/a g punctuation is not good. if you have any questions, please let me see it.
Echo "." '> ". $ row_Recordset1 ['CT _ title']." ";PHP: ". $ row_Rec... 'data-pics =''>
------ Solution ----------------
Before the Chinese word segmentation statistics, often have to crawl down the text contained in some of the tags, punctuation, English letters, such as filtering out, this process is called data cleansing.#Coding=utf-8ImportReImportCodecsdefstrs_filter (file): With Codecs.open (file,"R","UTF8") as F,codecs.open ("Result.txt","A +","UTF8") as C:lines=F.readlines () forLineinchlines:#line=line.decode (' UTF8 ')Re_html=re.compile (''. Decode ('UTF8'))#st
There was a small problem with eclipse today. The numbers become punctuation, punctuation becomes numbers, like my left shift+2.The result is a double quote, while shift+ "shows @." Of course this is simple, just restart eclipse, but there are always times when Eclipse has a server running and doesn't want to shut it down.At this time there are generally three kinds of solutions.1, Input method problem, I m
=
equals sign
Equals
Less-than Sign
Less than sign
>
Greater-than Sign
Greater than sign
.
Period, full stop or dot
Period, point
,
Comma
Comma
:
Colon
Colon
;
Semicolon
Semicolon
?
Question mark
Question mark
-
Hyphen
Hyphens
Incorrect display of Chinese Punctuation Marks in keil 4
Select configuation in edit in keil and Change Encoding to Chinese GB2312 to solve the problem of copying Chinese characters!
Keil MDK 412 font problems Courier New font Chinese display is not normal, it is difficult to see which can solve the problem of extra points
Why are you doing this? How about setting it? Is it just installed or used to program something accidentally?Keil MDK 412 font
A: According to the punctuation branch, the code is simpleTwo: CodeusingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespacelines{ Public Partial classFrm_main:form { PublicFrm_main () {InitializeComponent (); } Private voidBtn_true_click (Objectsender, EventArgs e) {StringBuilder P_stringbuilder=//creating a string processing
EditThe expression of symbols in English+ plus 加;正- minus 减;负± plus-minus 正负* is multiplied by / multipication sign 乘÷ is divided by / division sign 除= is equal to 等于≠ is not equal to 不等于≡ or === is equivalent to 全等于/恒等于? is approximately equal to or equal to / almost equal or equal to 等于或约等于≈ is approximately equal to / almost equal to 约等于
Reference:51Talk worry-free English/mac simplified Pinyin Input method(Punctuation/math/...) Eng
characters encoded by the UTF-8 may be 1 ~ It consists of three bytes. The specific number can be determined by the first byte. (Theoretically it may be longer, but it is assumed that the length cannot exceed 3 bytes)
Encoding method of UTF-8
The first byte is greater than 224, which together with the second byte after it forms a UTF-8 character
The first byte is greater than 192 less than 224, and it is a UTF-8 character with the first byte after it
Otherwise, the first byte is an English
The following is a code solution:1. Edit the wp-nodes des/formatting. php file and find the following code (line 57-60 of the source code. If the number of rows cannot be found, you can copy a segment to search ): The code is as follows:Copy code // Static strings$ Curl = str_replace ($ static_characters, $ static_replacements, $ curl );// Regular expressions$ Curl = preg_replace ($ dynamic_characters, $ dynamic_replacements, $ curl ); The str_replace () and preg_replace () functions are pl
public class Text {Java one character judging all is Chinese including punctuationPrivate static Final Boolean Ischinese (char c) {Character.unicodeblock UB = Character.UnicodeBlock.of (c);if (UB = = Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS|| UB = = Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS|| UB = = Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A|| UB = = Character.UnicodeBlock.GENERAL_PUNCTUATION|| UB = = Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION|| UB = = Chara
@Testpublic void Test () {//Personal feeling Java provides a very inconsistent approach, if the empty string after the split is still empty string, then, after the segmentation should not be an empty string? String Onedot = ","; String emptystring = ""; string[] split = Onedot.split (",");//After splitting the split size is 0string[] Split2 = Emptystring.split (",");// Empty string after splitting or empty string System.out.println (split.length);//Output:0system.out.println (split2.length);//Ou
This paper illustrates the method of JS matching Chinese punctuation mark. Share to everyone for your reference, specific as follows:
The screenshot of the running effect is as follows:
The specific code is as follows:
PS: Here again for you to provide 2 very convenient regular expression tools for your reference to use:
JavaScript Regular expression online test tool:Http://tools.jb51.net/regex/javascript
Regular expression online
and backup priorities for particularly important library tables
Do not bulk update, query database other specifications during peak business hours
Submit Online table Change request, must specify all relevant SQL statements
Other specificationsLog class data is not recommended to be stored on MySQL, giving priority to HBase or oceanbase, as needed for storage please look for DBA evaluation using compressed table storage.MySQL naming, design, and usage specifications--------the MySQ
.
SELECT * from employee,department where employee.dep_id = department.id; The job is to watch the work.
This is the same part of extracting two tables. But the different parts aren't left, right?
It's going to be a magical thing to use.
INNER JOIN : Link to a virtual table with the same portion of two tables as on condition.
SELECT * from the employee inner join Department on employee.dep_id = department.id;
Translation: I check employee first, on this basis continue to check
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.