Archive: String manipulation and loop problem


String manipulation and loop problem
Hi,

I run a query on a mysql server and I get this return value :

Tables_from_database (~tmp%)
~tmpclp481551
~tmpclp481552


I managed to clean this a bit to get :

~tmpclp481551
~tmpclp481552


Those two strings are mysql tables that I need to "DROP" but I can't figure how to make some kind of loop to do it. I already know how to run my drop query, I mostly need help to work with the string and loop.

I bet it's simple but I just couldn't find anything in the manual, examples or Google.

Any help is much appreciated!
Thanks;)

WordFind should the trick. It allows you to split strings.


Thanks solved, I managed to avoid the loop by formatting my string like

drop tables `table1`,`table2`


I used nsPerl to make all my string manipulation since I know more Perl than NSIS.

Thanks!