
Zhris
Enthusiast
Apr 19, 2011, 12:49 PM
Post #2 of 12
(20519 views)
|
Re: [kennychen614] Issues :matching variable $1,$2,... in replacement string
[In reply to]
|
Can't Post
|
|
Hi, Using "q" will interprate the string literally as "$1 of 10", therefore in order for $1 to interpolate, you would need to use "qq". However, since the regular expression hasn't been compiled yet, then $1 will interpolate as an empty string at this point, therefore it won't work as desired anyway. Personally I would stick to using your working method, afterall theres not really any reason why you need to put the "search" string and "replace" string in their own variables. Chris
(This post was edited by Zhris on Apr 19, 2011, 12:51 PM)
|