Guess value or Format value?

My genre filed have several genres, separated by comma (Dance, Electro, Reggae), and I wanted to replace it with only the first item of the string.

Before> Dance, Electro, Reggae
After> Dance

How can I do it? With Guess Value or Format Value? I could not find how to say witch one is the first, second, or third value..

Replace with regular expression is the most robust method here. (you could use below reg exp in the format function too)

Replace

^([^,]+?),.*

With

$1

Format method

$regexp(%genre%,'^([^,]+?),.*',$1)

Thank you very much. You're a genius.

Nah, thanks though.

Just been using this program and learning reg exp for many years.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.