Try:
string str = "l8c1E*p0x0Y";
string output = Regex.Replace(str, @"(\*p\dx\dY)", @"XXX$1");
"Hi OriginalGriff , Your solution worked for me , now i want to ask one more thing ... i have to replace left side string into right side string in below text .. In this text "left arrow sign" is one symbol which i could not copy paste so i wrote it in text ,its just one symbol. So please give me regular expression code to replace it . "left arrow sign"*p0x0Y --> "left arrow sign"xxx "left arrow sign"*p0x0Y Am i clear about my requirement , Original ?"
Without knowing the exact character, I can't be sure, but...the dot character matches anything, so it might be that what you want is:
string output = Regex.Replace(str, @"(.)(\*p\dx\dY)", @"$1XXX$1$2");
Give it a try. In the replacement code "$n" indicates a numbered match group from the match string, so "$1XXX$1" should give you "your-character XXX your-character" in the output.
If you are going to use regexes much, I'd recommend you get a copy of
Expresso [
^] - it's free, and it examines and generates Regular expressions.