I found the following function in VBscript that will reverse the order of a string. This is helpful if you want to do a right to left search. I created a function in NB that read each character and rewrote the order of the string. A 3k file took 20 seconds (!). With this VBscript it takes less than one second. Remember: if you are searching from right to left, remember to reverse the order of your searched item as well!.
This example expects a NB variable called [String2Reverse] and will give the resultant variable named [ReversedString]
Code: Select all
DIM String2Reverse
DIM ReversedString
String2Reverse = publication.nbGetVar( "[String2Reverse]" )
ReversedString = StrReverse( String2Reverse )
publication.nbSetVar "[ReversedString]", ReversedString
David P