Http://regexpal.com/
The above website can be used to detect the regular expression syntax of JS online.
In addition to the well-known fixed characters:
^: Match the beginning of the string and, in multiline searches, the beginning of a line.
$:
Today, I want to use a regular expression in Java to obtain any character in a piece of text. Therefore, you can write the following matching rules at will:(.*)After the result is run, the text after the line break cannot be obtained. So I checked
JavaScript supports regular expressions through the RegExp class. The simplest example is as follows:Copy codeThe Code is as follows:Var regApple = new RegExp ("apple ");It can match the first "apple" string in a string and is case sensitive. When
The younger brother was born with the idea of learning a new student, but the younger brother was naturally a little lazy and always wanted to see if there were any fast learning methods. So the younger brother asked google again, with his divine
Copy codeThe Code is as follows:$ Xmlfile = 'news/'. date ('ymmdh').'. xml ';$ Sourcexml = 'HTTP: // www.chinanews.com.cn/rss/scroll-news.xml ';If (! File_exists ($ xmlfile )){$ Str = @ file ($ sourcexml) or die ('An error occurred while loading the
Copy codeThe Code is as follows:// Match the text, which is useful occasionally, but be careful when the character contains \ E$ Str = '[a-z]';$ Str = preg_replace ('/\ G [a-z] \ E/', '', $ str );Echo $ str; // print empty, all replaced, probably
Copy codeThe Code is as follows:Function AutoLinkURLs (strString)Dim match, matches, offset, url, email, link, relnkAutoLinkURLRelnkAutoLinkURL = " [% URLText %] "If Not IsObject (regExp) Then Set regExp = New RegExpRegExp. Global = TrueRegExp.
This is from yyyy-mm-dd hh: mm: ss./^ (\ D {4}) \-(\ d {2}) \-(\ d {2}) (\ d {2 }) :( \ d {2}) :( \ d {2}) $ /;This is from yyyy-mm-ddde./^ (\ D {4}) \-(\ d {2}) \-(\ d {2}) $/Function validateCNDate (strValue ){Var objRegExp =/^ \ d {4} (\-| \/| \.)
The following provides a complete list and description of special characters that can be used in regular expressions.
Table 1.3: special characters in Regular Expressions:
Character \Meaning: For characters, it usually indicates the literal meaning,
In the simple correction version, replacement with functions cannot be completed for the moment, and normal replacement is now available.Http://www.jb51.net/tools/regex_test.htm no alert-regular exercise a regular expression is a regular
I would like to conclude that there is no time. I have seen a good article today. I would like to contribute and enjoy the powerful functions of regular expressions !!The text is as follows:------------------------------------------------------------
In general, regular expression matching is greedy, for example, the following example:String:... src = "http://www.bloghome.cn/1.mp3" type = "application/x-mplayer2 "....Results of requirements: http://www.bloghome.cn/1.mp3If the matching expression
What is the purpose of this statement. Explain "?" to me, What are the meanings of the "e", "I", and "s" symbols and their functions. Is there any other mode besides "/eis?Can I have any learning materials? Thank you for your help! Thank you.$ Post =
VBS Regular Expression FunctionsIt is mainly used in asp for obvious effect1. Form VerificationCopy codeThe Code is as follows: Function Validate (strng, patrn)Dim regExSet regEx = New RegExpRegEx. Pattern = patrnRegEx. IgnoreCase = TrueRegEx.
Copy codeThe Code is as follows:'--------------------------------------------------------------'Match object'Matched search results are stored in the Match object, providing access to read-only attributes matching regular expressions.'Match objects
Copy codeThe Code is as follows:'================================================ =============='Function name: ScriptHtml'Use: filter html tags'Parameter: ConStr ------ string to be filtered'================================================ =========
Copy codeThe Code is as follows:
Dim param, smiles 'Param is the fully available mark of the UBB label. param = full is fully available. Otherwise, smiles, a label with a large footprint, is not supported.Function UBBCode (content)Dim n, I'On error
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service