Hello.
I want to change cell’s text with activity “for each”
apple(fruit)
rice(grain)
banana(fruit)
steak(meat)
…
there is a column like that.
I want to get text without text in “()”
only apple, rice, banan, steak…
How can I get the values?
Hello.
I want to change cell’s text with activity “for each”
apple(fruit)
rice(grain)
banana(fruit)
steak(meat)
…
there is a column like that.
I want to get text without text in “()”
only apple, rice, banan, steak…
How can I get the values?
Hello hoseongwon,
You can try to do it with Regex and take everything until “(” should look like this:
^[^\(]+
Inside the for each row in datatable/for eqch row in excel activity…use a assign activity as below
Currentrow("columnname") = Currentrow("columnname").ToString.Split({"("},StringSplitOptions.None)(0)
If use for each excel instead use currentrow.Field("Name")
Hope this helps
Cheers
Hi @hoseongwon ,
Check this below code,
strVar(String type) = System.Text.RegularExpressions.Regex.Match("banana(fruit)",".*(?=\()", System.Text.RegularExpressions.RegexOptions.Multiline).Value
Screenshot:
Hope this help might you
Thank you! it really works.
I chose your answer because the most simple.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.