>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 ")