>Hi all
>
>I'm trying to get my head around using the RegExp object - so far it's OK but I've come across a problem I can't solve.
>
>My pattern will always be a '*' followed by a word or words and ending with another '*' e.g. *Testing* or *Testing again*. The pattern could occur any number of times in a large chunk of text.
>
>I want to replace the first '*' with '
' and the second '*' with '' so the
>end result will be
Testing and
Testing again>
>I guess the first question is if this is possible?'
>If so I'm having trouble getting the pattern syntax correct e.g.
Try:
oRegExp = CREATEOBJ('Vbscript.RegExp')
oRegExp.Global = .T.
oRegExp.Pattern = '\*(*)\*'
cSubstituted = oRegExp.Replace(cStringToFix,'< I >$1< /I >')