regex - Visual Studio 2012- Find and Replace - backreferences -
i have xml file , want replace every time value seconds milliseconds.
for instance, replace time="250" time="250000"
.
i tried using following
find: time="([0-9]*)" replace: time="$1000"
however, not seem work - replaces time="250" time="$1000"
. way can around ?
the problem replace isn't $1
, $1000
. visual studio doesn't know don't want include 3 0's in backreference.
you can use {}
around backreference tell visual studio use.
replace: time="${1}000"
obligatory note visual studio 2010 , older used different regular expression syntax, valid visual studio 2012 (and presumably newer versions).
Comments
Post a Comment