visual studio 2010 - How to include wildcard match in the replace portion of a find / replace operation? -
i'm using find , replace dialog in visual studio 2010. don't have problem getting results match find criteria. problem is, result after find / replace operation concludes * in string. visual studio treating asterisk literal character , places * in result. not need , not useful.
i'm using find criteria:
@html.textboxfor(*)
i'm using replace criteria:
@html.textboxfor(*, new { @class = "classname" })
if starting string,
@html.textboxfor( x => x.price)
i want result
@html.textboxfor( x => x.price, new { @class = "classname" })
not this
@html.textboxfor(*, new { @class = "classname" })
how perform find wildcard (*) not replace match literal * ?
select "use regular expressions".
find \@html\.textboxfor\({.*}\)
replace @html.textboxfor(\1, new { @class = "classname" })
Comments
Post a Comment