Skip to main content
1-Visitor
April 26, 2012
Solved

"match" function: what to do with the ( ) result?

  • April 26, 2012
  • 2 replies
  • 5260 views

The "match" function returns a result in ( ).

I would have liked to use the value returned by "match" as an index, but if I try to assign the "match" result to a variable, the variable is flagged as "undifined" when called further down the road.

"Help" is not much help on that.

Is there a way to make usage of the (value) returned by "match", or can this function be used for informational purpose only?

Thank you.

Best answer by MikeArmstrong

Yes, write match(z)[0

See if that works.

Mike

2 replies

1-Visitor
April 26, 2012

Yes, write match(z)[0

See if that works.

Mike

23-Emerald V
April 26, 2012

Mike Armstrong wrote:

Yes, write match(z)[0

See if that works.

Mike

with the caveat that this will return the first match - it may be worth checking if there are other values in match.

Stuart

1-Visitor
April 26, 2012

Good point, but Laurent did say value.

Mike

1-Visitor
April 26, 2012

LIke below if you have a single match.

Clipboard01.jpg

Mike