![]() ![]() ![]() ![]() RegExp object-and, if so, how many parenthesized submatches it specifies. (The exact number of arguments depends on whether the first argument is a In browser versions supporting named capturing groups, will be an object whose keys are the used group names, and whose values are the matched portions ( undefined if not matched). (For example, if the whole string was 'abcd', and the matched substring was 'bc', then this argument will be 1.) The offset of the matched substring within the whole string being examined. above.) For example, if /(\a )(\b )/, was given, p1 is the match for \a , and p2 for \b . The nth string found by a parenthesized capture group (including named capturing groups), provided the first argument to replace() was a RegExp object. The JavaScript String replace() method returns a new string with a substring ( substr ) replaced by a new one ( newSubstr ). The arguments to the function are as follows: Possible name Replaced if the regular expression in the first parameter is global. Note that the function will be invoked multiple times for each full match to be Replacement patterns do not apply in this case.) The function's result (return value) will be Invoked after the match has been performed. You can specify a function as the second parameter. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |