Discover regular expression case insensitive, include the articles, news, trends, analysis and practical advice about regular expression case insensitive on alibabacloud.com
Special characters in regular expressions
Character implication
\ As a turn, that is, the characters usually after "\" are not interpreted in the original sense, such as the/b/matching character "B", when B is preceded by a backslash/\b/, to
The regular expression is case-insensitive. The regular expression is case-insensitive.
Case Insensitive for regular expressions-RegexOptions. IgnoreCaseFor example:Copy codeThe Code is as follows:Str = Regex. Replace (Str, "or", "", RegexOptions.
JavaScript's RegExp objects and string objects define methods that use regular expressions to perform powerful pattern matching and text retrieval and substitution functions.
In JavaScript, regular expressions are represented by a RegExp object. Of
Regular Expression I modifier (Case Insensitive), regular expression case
Regular Expression I modifier:
The I modifier specifies that regular expression matching is case insensitive.
Syntax structure:
Constructor method:
New RegExp ("regexp", "
The regular expression is a regular expression. It seems that English is better understood than Chinese, that is, the regular expression is checked for non-conforming characters !! Regular expressions have a powerful and complex object RegExp, which
The regular expression is a regular expression. It seems that English is better understood than Chinese, that is, checking expression charactersNot compliant !! Regular expressions have a very powerful and complex object Regexp. In javascript1.2.Let'
Replace () is a simple replacement of characters.
ExampleCodeAs follows:
It only replaces the first letter. However, if you add a regular expression, the results will be different! Replace () supports regular expressions. It can match
Regular expression syntax on JavaScript
Author: no powerSource: http://www.blog.edu.cn/user2/afan/archives/2006/1215847.shtml
A regular expression is an object that describes the character mode.The Regexp object and string object in Javascript
A regular expression is an object that describes the character mode.
The Regexp object and string object in Javascript define a method that uses regular expressions to execute powerful pattern matching and text retrieval and replacement functions.
On regular expressions, regular expressions
First, what is a regular expression?
Simply put: Regular expressions (Regular expression) is a language that handles string matching;
A regular expression describes a pattern of string matches that can be
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.