Steve-vfp9user
Programmer
Hello all
I am trying to replace certain text within a memo field (ACTIONS) with other characters that are between a certain character.
For example:
This is some text in the memo field and I require !This text removed! (That is surrrounded by ! together with the !) and replace with XXXXXXXXXXXXXXXXX (or whatever length of the string that is surrounded by the character !
It would be most advantageous if the text replaced could be with some sort of black square. I recall there is such a character but I couldn't see it in the ASCII list.
I am aware of:
The above only replaces text with a predefined alternative but I need it to recognise the length of the text to be replaced and replace it with characters fitting that length as described above.
Can anyone please shed some light or give me a pointer please?
Thank you
Steve Williams
VFP9, SP2, Windows 10
I am trying to replace certain text within a memo field (ACTIONS) with other characters that are between a certain character.
For example:
This is some text in the memo field and I require !This text removed! (That is surrrounded by ! together with the !) and replace with XXXXXXXXXXXXXXXXX (or whatever length of the string that is surrounded by the character !
It would be most advantageous if the text replaced could be with some sort of black square. I recall there is such a character but I couldn't see it in the ASCII list.
I am aware of:
Code:
USE MYTABLE IN 0
REPLACE ALL ACTIONS WITH ;
STRTRAN(ACTIONS,"THE TEXT","XXXXXXXXXX") ;
IN "MYTABLE"
The above only replaces text with a predefined alternative but I need it to recognise the length of the text to be replaced and replace it with characters fitting that length as described above.
Can anyone please shed some light or give me a pointer please?
Thank you
Steve Williams
VFP9, SP2, Windows 10