Replacing string between two string iphone sdk -
in objective c want replace string between 2 string.
for example "ab anystring yz"
i want replace string between "ab" , "yz".
is possible do? please help
thx in advance.
nsstring *newstring = [(nsstring *)youroldstring stringbyreplacingoccurrencesofstring:@"anystring" withstring:@""];
otherwise you're going have copy of regexkitlite , use regex function like:
nsstring *newstring = [(nsstring *)youroldstring stringbyreplacingoccurrencesofregex:@"ab\\b.\\byz" withstring:@"ab yz"];
Comments
Post a Comment