![]() ![]() ![]() Insert the text matched by the highest-numbered capturing group, regardless of whether it participated in the match. Insert the text matched by capturing groups 1 through 99. Replacing ( a ) ( b ) ( c ) with $3 9 $3 8 $1 7 in abc yields c9c8a7 ![]() Replacing ( a ) ( b ) ( c ) with $3 $3 $1 in abc yields cca Replacing ( a ) ( b ) ( c ) with \3 9 \3 8 \1 7 in abc yields c9c8a7 When there are fewer capturing groups than the 2-digit number, treat this as a single-digit backreference followed by a literal number instead of as an invalid backreference. Insert the text matched by capturing groups 10 through 99. Replacing ( a ) ( b ) ( c ) with \3 \3 \1 in abc yields cca Insert the text matched by one of the first 9 capturing groups. Replacing (a)(b)(c) with 393817 in abc yields c9c8a7. Replacement Strings Reference: Matched Text and Backreferences When there are fewer capturing groups than the 2-digit number, treat this as a single-digit backreference followed by a literal number instead of as an invalid backreference. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |