Hi Abhishek,
Like that?
"Camel Cow Travel Show" -replace 'el (C|Sh)', "El $('$1'*10)"
---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar:
http://tinyurl.com/PSToolbar
AS> Consider the following arbitrary example:
AS>
AS> "Camel Cow Travel Show" -replace 'el (C|Sh)', 'El $1'
AS>
AS> I would like to repeat $1 say 10 number of times. So I attempted
AS> "Camel Cow Travel Show" -replace 'el (C|Sh)' 'El $1 * 10'
AS>
AS> This fails. I suppose because of the quoting. But I am unable to
AS> figure out how to do this. Please help
AS>
AS> Thanks
AS>