jordanking
Programmer
- Sep 8, 2005
- 351
Is there a way to use wild cards in the replace method. The following did not work:
I have a string that is bascially the contents of a large array that is deliminated by |item|. Each item is an integer (not ascending or ordered, basically random) between 1 and 999 sandwiched by tilds(i.e: |1||12||87||5||126|) I want to be able to replace the first 32 occurances, skip over the next 52 and then replace the remaining occurances. The numbers 32 and 52 are user inputted values that I have captured. The entire string's length changes each time.
I can make the above code work when I put literal integers between the tilds but I don't know how to indicate any number between the tilds.
Thanks in advance.
jordan
Code:
strOutput = Replace(strOutput, "|***|", "", 1, 34, vbDatabaseCompare)
I have a string that is bascially the contents of a large array that is deliminated by |item|. Each item is an integer (not ascending or ordered, basically random) between 1 and 999 sandwiched by tilds(i.e: |1||12||87||5||126|) I want to be able to replace the first 32 occurances, skip over the next 52 and then replace the remaining occurances. The numbers 32 and 52 are user inputted values that I have captured. The entire string's length changes each time.
I can make the above code work when I put literal integers between the tilds but I don't know how to indicate any number between the tilds.
Thanks in advance.
jordan