On Jan 19, 11:14 pm, Spam Catcher <spamhoney...@rogers.comwrote:
alexvorn2 <alexvo...@gmail.comwrote in news:3169c06a-d42b-441d-9f8d-
056a9e32c...@s8g2000prg.googlegroups.com:
Hi! I use VB 2008 and I want to ask you how I can replace the text
that is between "*" and "*" in a text file?
If text file contains this:
*dog*
*cat*
*bird*
*lion*
*something*
....end of file....
I want that the code will replace *dog* with *animal*,
*cat* with *animal* too
*lion* with *animal*
Yes, you can use regular expressions to do this sort of ting.
I think \*\w\* should be able to find all matches.
--
spamhoney...@rogers.com (Do not e-mail)
Hi, but what I need to do to make this code to work?
For example this code: (it not works)
Dim TestString As String = "Sh*o*pping List"
' Returns "Shipping List".
Dim aString As String = Replace(TestString, "\*\w\* ", "i")
MsgBox(aString)