Hi Ed,
Thanks a lot for your response. I knew, WSH can do it and you would say it...
Right now I used Larry MIller suggestion, works fine also, but it nice to know, that it could be done other way too.
Thanks again.
>>Hi everybody,
>>
>>I understand, that this question should have a simple answer, but I stuck :( Could somebody help me?
>>
>>The problem is:
>>
>>I have a string, say,
>>myString='Nadya, are you totally lost??!!! : <>>>>>'
>>
>>I have several symbols, like:
>>symbols=[:;./\<>+=-}]()#*]
>>
>>I want to surround these symbols with space(1)+symbol+space(1), for each occurance of these symbols in my string.
>>
>>How can I do that?
>
>The easiest way would be using a regular expression parser; look into the VBScript.RegExp object from the WSH:
>
>oRegExp = CREATEOBJ('VBScript.RegExp')
>oRegExp.Global = .T.
>oRegExp.Pattern = "([:;.=])" && the others are doable but require special syntax
>MyFixedString = oRegExp.Replace(mystring," $1 ")
If it's not broken, fix it until it is.
My Blog