string parse and replace in for loop

Posted by reffer on Stack Overflow See other posts from Stack Overflow or by reffer
Published on 2010-04-08T23:49:46Z Indexed on 2010/04/08 23:53 UTC
Read the original article Hit count: 265

Filed under:
|
|
|

i have a string that looks like this - "1AL||9CA||34CO||196WY||..." i want to use a for loop or while loop, in which if i have an integer, it should parse this string and delete the value matching that integer. example for above string

string = "1AL||9CA||34CO||196WY||..." integer = 34

for ... loop

new string = "1AL||9CA||196WY||..."

As you can see the integer matched the integer 34 and deleted from one delimeter "||" to th next one. how can i do this?

© Stack Overflow or respective owner

Related posts about parse

Related posts about delete