Is it possible to create an array and then use the array in a Replace()?<BR><BR>Right now I have a Replace(Replace(Replace()))...<BR><BR>Can anyone show me how to do this more efficiently? Thanks.
Create a function, surely?<BR><BR>Function ReplaceArray(ByVal strString, ByRef arrArray)<BR> ReplaceArray = strString<BR> If IsArray(arrArray) = False Then Exit Function<BR> Dim intCounter<BR> For intCounter = 0 To Ubound(arrArray, 2)<BR> strString = Replace(strString, arrArray(0, intCounter), arrArray(1, intCounter))<BR> Next<BR> ReplaceArray = strString<BR>End Function<BR><BR>?<BR><BR>Craig.
...which are brilliant for this sort of thing. Mind you, regular expressions can be quite complicated and it may take you some time to learn them. With some basic examples though you'll soon be off and laughing. :-)<BR><BR>Oliver.