JS regular function match, exec, test, search, replace, split use the introduction set1.match MethodUse the regular expression pattern to perform a lookup on a string and return the result that contains the lookup as an array.Stringobj.match (RGEXP)ParametersStringobjRequired option. A string object or string literal on which to find.RgexpRequired option. is a regular expression object that contains the regular expression pattern and the available flags. It can also be a variable name or string
The original Http://www.jb51.net/article/28007.htm JS regular function match, exec, test, search, replace, split use the introduction set, learning regular expression of friends can refer to.
Match Method Use the regular expression pattern to perform a lookup on a string and return the result that contains the lookup as an array. Stringobj.match (rgexp) parameterStringobj required option. A string object or string literal on which to find. RgexpRequired option. is a regular expression object th
Match Method
Performs a lookup on a string using the regular expression pattern and returns the result that contains the lookup as an array.
Stringobj.match (RGEXP)
Parameters
Stringobj
Required option. A string object or string literal to find it.
Rgexp
Required option. Is the regular expression object that contains the regular expression pattern and the available flags. It can also be a variable name or string literal that contains the regular expression pattern and the available flags.
The r
Substring methodReturns a substring at the specified position in a string object.Strvariable.substring (start, end)"String Literal". Substring (start, end)ParametersStartIndicates the starting position of the substring, starting at 0.EndIndicates the ending position of the substring, starting at 0.DescriptionMethod will return a string containing a substring from start to last (not including end).The substring method uses the smaller values from start and end as the starting point for the substr
The barrel theory is also called the short-board theory, and the short-board management theory. The so-called "Barrel Theory" is also called the "barrel law". Its core content is: the amount of water in a bucket, it does not depend on the highest block on the bucket wall, but on the shortest block on the bucket wall. According to this, there can be two inferences: first, the barrel can be filled with water only when all the boards on the bucket wall are high enough. Second, as long as there is n
backgrounds and line icons, so the main menu doesn't see any dividers, but it's organized so that users can easily navigate through the app.Bottom MenuThe bottom menu is primarily used as a navigation aid to differentiate between functional blocks or standalone components within.Jakub Antalík's Badoo concept design has a navigation at the bottom of the screen. It also contains a set of extended menus, each with its own control panel.Virgil pana desig
XML version= "1.0" encoding="UTF-8"?>
beans>
Bean id="E" class="Com.tgb.spring.factory.England" />
Bean id="S" class="Com.tgb.spring.factory.Spain" />
Bean id="P" class="Com.tgb.spring.factory.Portugal" />
Beans>
The client loads the above configuration file by invoking the previous Classpathxmlapplicationcontext, and then it can get the bean we need by ID:[Java]View PlainCopy
Package com.tgb.spring.factory;
Public class Test {
public s
property changes with the execution of the exec (), test () method, but the regular expression must have the G modifier.The value of the Lastindex property is reset when the exec () and test () method executes without matching the results of the condition, which is 0.Example:var str = ' The rain in Spain stays mainly in the plain '; var New RegExp (' Ain ', ' g '= 8=>5==>14==>25 = 0=>40* By comparison of return values we can find:LastIndex = Index+s
; quiet womanJudy Hebrew praiseJulia Latin hair soft; YoungJulie has a gentle, calm face in GreeceJuliet Julia Latin hair soft; YoungJuneKama India god of loveKaren Greek purityCatherine, Greek pureKay; King Arthur's brotherKelly Ghel, female warriorKimberley Jin baili, British-born from the Royal lawnKitty giti Greek pureKristin Christine followers and disciples of Greek ChristLaura Rolla Latina laurel tree; victoryLaurel rorel Latina laurel tree; victoryLauren lorun's Latina laurel treeLee, Br
Match methodPerforms a lookup on a string using the regular expression pattern and returns the result that contains the lookup as an array.Stringobj.match (RGEXP)ParametersStringobjRequired option. A string object or string literal to find it.RgexpRequired option. Is the regular expression object that contains the regular expression pattern and the available flags. It can also be a variable name or string literal that contains the regular expression pattern and the available flags.The rest of th
alphabetical order. Listing B shows an example of Listing:Listing BCopy codeThe Code is as follows:?> The output result is as follows:Copy codeThe Code is as follows:Array ([0] => 8[1] => 7[2] => 5[3] => 2[4] => 1) Sort by keywordWhen we use an array, we often sort the array again based on the keyword, from high to low. The Ksort () function is a sort function based on keywords. It also maintains the relevance of keywords during sorting. Listing C is an example:Listing CCopy codeThe Code is as
The Java. lang package has a string class method: Split ("separator" [, limit]). This method returns an array.
Separator indicates the delimiter and limit indicates the number of elements in the returned array.
Note:If "." and "|" escape characters exist in the separator, \: Must be added before them \\:If ". ", must be written as follows: string. split ("\\. "), in this way, the correct separation is not allowed using string. split (". ");If "|" is used as the separator, it must be written as
Shiller know that managing these animal spirits requires the steady hand of government -- simply allowing markets to work won't do it. in rebuilding the case for a more robust, behaviorally informed Keynesianism, They detail the most pervasive effects of animal spirits in contemporary economy life -- such as confidence, fear, bad faith, reply uption, A concern for fairness, and the stories we tell ourselves about our economical fortunes -- and show how Reaganomics, Thatcherism, and the rational
Java. Lang. String. Split
Split MethodSplits a string into substrings and returns the result as a string array.
Stringobj. Split ([separator, [limit])
StringobjRequired. String object or text to be decomposed. This object will not be modified by the split method.
SeparatorOptional. A string or regular expression object that identifies whether a string is separated by one or more characters. IfReturns a single array of elements that contain the entire string.
LimitOptional. This value is used to
Germany
Costa Rica
Poland
Ecuador
England
Paraguay
Trinidad
Sweden
Argentina
Côte d'ivoire
Se
Netherlands
Mexico
Iran
Angola
Portugal
Italy
Ghana
USA
Czech Republic
Brazil
Croatia
Australia
Japan
France
Switzerland
South Korea
Togo
Spain
Ukraine
Tunisia
]
Function call: Document. Write (testdemo (/Ain +/, "The rain in Spain falls mainly in the plain ."));
Returned value: 'The rain in Spain falls mainly in the plain. 'containin' ain +'
Match MethodUse the regular expression mode to perform a query on the string and return the result containing the query as an array. \\Stringobj. Match (rgexp)
Parameter \\StringobjRequired. String object or string te
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.