c# - RegEx to replace a particular pattern v-q- to q- and v- to q- . -
i new regex.
the sentence
string ttt = "becoming <a href=\"/v-abc-q-def-ghi.aspx\">lorem ipsum</a> or <a href=\"/v-xyz.aspx\">lorem ipsum dummy "
i want change patterns match
v-abc-q-def-ghi q-def-ghi
v-xyz q-xyz
the requirement if v- , q- present, should remove v-* ,
if has v-* should changed q-*.
var matches = regex.match(ttt, "v-*-q-*"); - 0 matches . tried few mor ethings using ([a-z])\?([a-z]) , characters, not figure out :(
kindly me this. achievable ?