Hello everyone;
When searching for text, I find that nothing is as good as using regular expressions. hb_RegExAll() --my favorite, will search for a regular expression on any string and return a double dimensioned array with all matches. Once you do know the matches you could potentially use StrTran to replace with desired text, or you could use hb_RegExReplace() to do so from the very beginning.
To build the regular expression you
cal always look at any regular expression tutorial and tester online. That's what I do every time I need to build a regular expression for anything.
For example:
- Code: Select all Expand view
#define _SEARCH ">[A-Z]*[a-z]*[A-Z]*[a-z]*[0-9]*<"
LOCAL cYourString := '<property name="PointRefPointName">MarcTag001</property>'
LOCAL cReplaceWith := '>PI101<'
HB_RegExReplace( _SEARCH, cYourString, cReplaceWith )
Hope that helps,
Reinaldo.