backreference
Named backreferences with preg_replace
Pretty straightforward; I can\'t seem to find anything definitive regarding PHP\'s preg_replace() supporting named backreferences:[详细]
2023-02-16 02:29 分类:问答How to use backreferences in PHP
I want to add a character to the end of each file extension found in a body of text usi开发者_如何学编程ng preg_replace().[详细]
2023-02-04 14:57 分类:问答Perl pattern match variable question
I\'m trying to open a file, match a particular line, and then wrap HTML tags around that line. Seems terribly simple but apparently I\'m missing something and don\'t understand the Perl matched patter[详细]
2023-02-02 22:42 分类:问答How to pass Javascript back reference to key or function?
<script type=\'text/javascript\'> // I have template and info var img_template = \"<img src=\'{src}\' width=\'{width}\' height=\'{height}\' title=\'{title}\' />\";[详细]
2023-01-29 21:04 分类:问答How can I find, increment and replace in php?
I have strings in the form \\d+_开发者_如何学C\\d+ and I want to add 1 to the second number. Since my explanation is so very clear, let me give you a few examples:[详细]
2023-01-25 20:43 分类:问答Negative backreferences in MySQL REGEXP
MySQL manual is not very detailed about what expressions it supports, so I am not sure if the following is possible with MySQL at all.[详细]
2023-01-24 03:49 分类:问答javascript pattern replacement using backreference is not working
string.replace(/([\\开发者_如何学Pythont])/g,\"\\\\$1\") is working fine where string.replace(/([\\n])/g,\"\\\\$1\")[详细]
2023-01-18 17:46 分类:问答RegEx modify Backreference's value
Is there a way to modify the value of a backreference? Example: In the following Text \"this is a test\"[详细]
2023-01-10 00:56 分类:问答Regex: How to replace with the string literal "\1"?
I have a string, say r\"a\". I want to replace every r\"a\" with the string r\"\\1\", but my regex engine does not understand this.[详细]
2023-01-08 07:55 分类:问答Backreferences Syntax in Replacement Strings (Why Dollar Sign?)
In Java, and it seems in a few other languages, backreferences in the pattern are preceded by a backslash (e.g. \\1, \\2, \\3, etc), but in a replacement string they preceded by a dollar sign (e.g. $1[详细]
2023-01-01 05:29 分类:问答