The biggest drawback to Regular Expressions is
maintainability. It's not
something many programmers know (especially not know well)
and it's hell
cryptic. If it's your pet app and you will always maintain
it that's one
thing, but if you write it and the poor junior fresh out of
college has
to maintain it later, they're not quite such a good idea.
Dino
-----Original Message-----
From: Discussion of writing applications and components
using Visual
Basic .NET [mailto:VBDOTNET DISCUSS.DEVELOP.COM] On
Behalf Of Pardee,
Roy
Sent: Saturday, 11 March 2006 09:56
To: VBDOTNET DISCUSS.DEVELOP.COM
Subject: Re: [VBDOTNET] How to replace all occurences of
character
within a section of string.
I bet you want System.Text.REgularExpressions. Bit of a
learning curve
there, but it *so* rewards study...
HTH,
-Roy
-----Original Message-----
From: Discussion of writing applications and components
using Visual
Basic .NET [mailto:VBDOTNET DISCUSS.DEVELOP.COM] On
Behalf Of Stacey
Levine
Sent: Friday, March 10, 2006 12:59 PM
To: VBDOTNET DISCUSS.DEVELOP.COM
Subject: [VBDOTNET] How to replace all occurences of
character within a
section of string.
I know that the string object has the .replace which will
replace all
occurrences of a selected text with the result. My problem
is a little
different. Part of a string is as below. Unfortunately, the
entire
document can't be treated as an XML document. What I need
to do is
locate all of the strings indicated by src= and replace all
of the
backslashes with forward slashes. I could get firstIndex of
src.. but
what I really want is all indexes of src and then I could
scan for " and
then " and work on the area in the middle. My head is
spinning a little
right now. Looking for any suggestions.. thanks.
.....10.0.0.3990"/><title>Playlist</title&
gt;</head><body><seq><media
src="\\vmcstream\C\wmpub\WMRoot\39398\39398_D1_
2.wma"/><media
src="\\vmcstream\C\wmpub\WMRoot\39398\39398_D1_
3.wma"/><media
src="\\vmcstream\C\wmpub\WMRoot\39398\39398_D1_
4.wma"/><media
src="\\vmcstream\C\wmpub\WMRoot\39398\39398_D1_
5.wma"/><media
src="\\vmcstream\C\wmpub\WMRoot\39398\39398_D1_
6.wma"/>
Stacey Levine
Lead Technical Architect
Value Music Concepts
825-C Franklin Court
Marietta, GA 30067
678-229-4255
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|