Replace and regexp usage0 Comments | This entry was posted on Apr 08 2010.
Mysql replace usage
1. replace
Replace into table (id, name) values ('1', 'A'), ('2', 'bb ')
This statement inserts two records into the table. If the primary key id is 1 or 2
Use of Replace and regexp0 Comments | This entry is posted on APR 08 2010
MySQL Replace usage
1.replace into
Replace into table (Id,name) VALUES (' 1′, ' AA '), (' 2′, ' BB ')
The purpose of this statement is to insert two records into table tables.
MySQL field values are replaced by the following practices:
The code is as follows
Copy Code
Update ' Table_hospital ' Set service=replace (service, "", "")
Can limit the ID, scope, specific content to play
ArticleDirectory
Syntax for creating a Regexp object:
Direct amount syntax
Syntax for creating a Regexp object:
Parameters
Return Value
Throw
Return Value
Description
Return Value
Description
Return Value
Document directory
Return Value
Description
Return Value
Description
Return Value
Description
Syntax
Return Value
Direct amount syntax
/Pattern/attributes
Syntax for creating a RegExp object:Copy codeThe Code is as follows: var obj =
Direct amount syntax/Pattern/attributesSyntax for creating a RegExp object:Copy codeThe Code is as follows:Var obj = new RegExp (pattern, attributes );Example 1:Copy codeThe Code is as follows:Var pattern =//;Document.write(pattern.exe c ("asdas "));
Direct volume syntax
/pattern/attributes
To create the syntax for a RegExp object:
Copy Code code as follows:
var obj=new RegExp (pattern,attributes);
Case 1:
Copy Code code as follows:
var pattern=/a/;
Javascript provides a Regexp object to perform operations and functions on regular expressions. Each regular expression pattern corresponds to a Regexp instance. You can create an instance of the Regexp object in two ways.
Use Regexp's explicit
This article mainly introduces details about how to use substr, substring, indexOf, lastIndexOf, split, and replace in js. For more information, see indexOf () returns the position of the first occurrence of a specified string value.
The
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.