regexp replace question

  • Thread starter Thread starter Bill McCormick
  • Start date Start date
B

Bill McCormick

Hello,

I'm new to VB.NET but have used regexp in Perl and VI.

I'd like to read a regular expression from a file and apply it to a
string read from another file. The regexp is simple word replace
operation, so my input regexp file lines might look like this:

/foo/bar/

So if a line in input file looked like "I'd like to foo", then the
output line would be "I'd like to bar".

It seems so simple, but I can't find the right form.
 
Dont know abt the regex part.
But if you have reached the point when you know you need to convert this
string to that,

Then you can use String.Replace method

I hope the initial part wasnt the real problem :-)

HTH
rawCoder
 
rawCoder said the following on 9/8/2005 12:50 PM:
Dont know abt the regex part.
But if you have reached the point when you know you need to convert this
string to that,

Then you can use String.Replace method


Understood. But I'd like to know how to do it with regexp.

I hope the initial part wasnt the real problem :-)

HTH
rawCoder
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top