Subscribe Bookmark RSS Feed

How to extract a value?

kaushik_pushpen

Community Trekker

Joined:

Feb 22, 2015

Hello,

There is one value given in the table like +0.003-0.003. Into which i want to extract 0.003 value using script. Please help me.

1 ACCEPTED SOLUTION

Accepted Solutions
vince_faller

Super User

Joined:

Mar 17, 2015

Solution

You could use word to pick the first word and give it delimeters

Num( Word( 1, :Column 1, "+-" ) )

or a regex and grab the value itself between + and -

Num( Regex( :Column 1, "\+(.*)\-", "\1" ) )

2 REPLIES
vince_faller

Super User

Joined:

Mar 17, 2015

Solution

You could use word to pick the first word and give it delimeters

Num( Word( 1, :Column 1, "+-" ) )

or a regex and grab the value itself between + and -

Num( Regex( :Column 1, "\+(.*)\-", "\1" ) )

kaushik_pushpen

Community Trekker

Joined:

Feb 22, 2015

Thanks Vince