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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regex and the period? 1

Status
Not open for further replies.

G00GLER

Instructor
May 17, 2005
57
0
0
US
Quick question, i want to replace the webaddress to reflect the new location in 118 sql text fields. so i am reading them in, doing regex.replace so I can do an update the text fields.

The following works:
Code:
messageReplaced = Regex.Replace(message, "intranet", "dcintranet");
However this desired code doesn't work at all.
Code:
messageReplaced = Regex.Replace(message, "intranet.webaddress.com", "dcintranet.webaddress.com");

I assume it's something simple with the period.
 
any pointers?

i got nothing googling this.
 
the period is a character which denotes any character (like * in windaz) . you need to escape it as \.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top