ODBiC Discussion Board


RE: Comparing Substrings, David Richardson, 03-12-2008

Here is a scrpt I used

by Gordon, March 12, 2008 13:52

<!--COMMENT Text01 is the text you imported, txtSearch is the text you want to delete, Text03 is text after deleted --> <!--SET Text01 = 'This is a test for you to test' --> <!--SET txtSearch = 'test' --> <!--SET Text02=$Text01$, Text03='', Count01=0 --> <!--WHILE LEN($Text02$) --> <!--SET Count02 = LEN($Text02$) --> <!--SET Count03 = LEN($txtSearch$) --> <!--SET Count04 = MATCH($LCASE($Text02$), $LCASE($txtSearch$)) --> <!--IF $Count04$ --> <!--SET Text03 = $Text03$$LEFT($Text02$,$Count04$-1) --> <!--SET Text02 = $MID($Text02$,$Count03$+$Count04$) --> <!--IF LEN($Text02$) = 0 --> $Text03$ <!--BREAK --> <!--ENDIF --> <!--ELSE --> <!--IF $Count01$ --> $Text03$$Text02$ <!--ELSE --> $Text1$ <!--ENDIF --> <!--BREAK --> <!--ENDIF --> <!--SET Count01 = $Count01$ + 1 --> <!--ENDWHILE -->



Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.