overrider Posted October 11, 2006 Posted October 11, 2006 (edited) Hello all, i have a textfield containing two strings "the quick brown [fox jumps over] the lazy dog" . how can i best parse out the content between the [ ] characters? until now i have come up with Middle ( string ; Position ( string ; "[" ; 1 ; 1 ) + 1 ; ( Position ( string ; "]" ; 1 ; 1 ) - Position ( string ; "[" ; 1 ; 1 ) -1 ) ) , is that the best solution? how can i fix this, so that in case there are more than one ] in the string, all but the last ] are converted to some other character, say * ? Edited October 11, 2006 by Guest
BobWeaver Posted October 11, 2006 Posted October 11, 2006 Let([ C=PatternCount(string;"]") ]; Middle ( string ; Position ( string ; "[" ; 1 ; 1 ) + 1 ; ( Position ( string ; "]" ; 1 ; C ) - Position ( string ; "[" ; 1 ; 1 ) -1 ) ) )
Recommended Posts
This topic is 6617 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now