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

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

Recommended Posts

Posted

This is one simple text parser which I use as a custom function. So, if you have to take one part of the text, set the parameters in Ripper and go on.

Let (

[

$Start = Position(Field; Parameter_From; ""; Occurrence1);

$End = Position(Field; Parameter_To; ""; Occurrence2)

];

Middle(Field; $Start+Start_Correction; $End-$Start-Length_Correction)

)

Posted

This is one simple text parser which I use as a custom function. So, if you have to take one part of the text, set the parameters in Ripper and go on.

Let (

[

$Start = Position(Field; Parameter_From; ""; Occurrence1);

$End = Position(Field; Parameter_To; ""; Occurrence2)

];

Middle(Field; $Start+Start_Correction; $End-$Start-Length_Correction)

)

Posted

This is one simple text parser which I use as a custom function. So, if you have to take one part of the text, set the parameters in Ripper and go on.

Let (

[

$Start = Position(Field; Parameter_From; ""; Occurrence1);

$End = Position(Field; Parameter_To; ""; Occurrence2)

];

Middle(Field; $Start+Start_Correction; $End-$Start-Length_Correction)

)

  • 1 month later...
  • Newbies
Posted

Can this function be used to split a number too?

I need to split a fields contents (100,00) so that newfield 1 holds 100 and newfield 2 holds the 00. So I would use comma as seperator.

Could you set up an exaple here how to do that?

Posted

1.0 To get a hundred adjust Ripper like this:

Let (

[

// ** from first round fence

$Start = Position(Field; "("; ""; 1);

// ** to the first comma separator

$End = Position(Field; ","; ""; 1)

];

/* Start correction plus 1 (otherwise you'll capture left round fence "(" in your result

) and with same reason end correction is -1 (to avoid comma sepratator in end result) */

Middle(Field; $Start+1; $End-$Start-1)

)

2.0 To get zeros:

Let (

[

$Start = Position(Field; ","; ""; 1);

$End = Position(Field; ")"; ""; 1)

];

Middle(Field; $Start+1; $End-$Start-1)

)

×
×
  • Create New...

Important Information

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