Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using one regexp to replace multiple strings

Status
Not open for further replies.

Steel811

Programmer
Jan 2, 2008
26
0
0
US
Hello,

Is it possible in regexp to replace different strings with different values? For instance, I am reading a URL to a specific file, and I am changing it into a corresponding folder path. So with the input file looking like this:


It needs to be changed to this:

c:\webroot\c:\webroot\
I have been able to replace the with c:\webroot\ but I am unsure on if I can use the same Regular Expression object to switch the forward slashes to backslashes. Can this be done? If not, can someone provide me with an alternate?

Thanks,
Sheel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top