Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6617 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (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 by Guest
Posted

Let([

C=PatternCount(string;"]")

];

Middle ( string ; Position ( string ; "[" ; 1 ; 1 ) + 1 ; ( Position ( string ; "]" ; 1 ; C ) - Position ( string ; "[" ; 1 ; 1 ) -1 ) )

)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.