string Replace in vb.net
-
hello all i have to replace some string search text is - <a href="/ replace text is - <a href="http://www.mysite.com/ and i am using below str = Replace(str, "<a href="/","<a href="http://www.mysite.com/") but i am unable to use escape sequence . please help some
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
-
hello all i have to replace some string search text is - <a href="/ replace text is - <a href="http://www.mysite.com/ and i am using below str = Replace(str, "<a href="/","<a href="http://www.mysite.com/") but i am unable to use escape sequence . please help some
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
AS you didn't tell us the error, I have to guess and assume it's because you have a " in your string, and need to use \" instead.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
AS you didn't tell us the error, I have to guess and assume it's because you have a " in your string, and need to use \" instead.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
please type my code in you application then you will get my problem. actualy " comes im my string so it creating problem in string building
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
-
hello all i have to replace some string search text is - <a href="/ replace text is - <a href="http://www.mysite.com/ and i am using below str = Replace(str, "<a href="/","<a href="http://www.mysite.com/") but i am unable to use escape sequence . please help some
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected
VB doesn't understand C-style escapes. Additionally, you escaped the string delimiters, not the quotes inside the string. Double quotes must be paired up to be escaped in VB, so your statement would look like:
str = Replace(str, "
[A guide to posting questions on CodeProject](http://www.codeproject.com/scrapbook/ForumGuidelines.asp)\[[^](http://www.codeproject.com/scrapbook/ForumGuidelines.asp "New Window")\]
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
2006, 2007, 2008 -
hello all i have to replace some string search text is - <a href="/ replace text is - <a href="http://www.mysite.com/ and i am using below str = Replace(str, "<a href="/","<a href="http://www.mysite.com/") but i am unable to use escape sequence . please help some
Rajeev Kr. Sharma VRI Software Pvt.Ltd. New Delhi India HumOnline.com Stay Connected