Hello, I have been recently faced with a very simple problem, which I unfortunately cannot solve:
I have a column “XYZ” including the following strings:
(1)
(2)
(3)
(4)
(5)
…
What I would need is to get rid of those brackets and save the result in a number format. How could I do that?
I tried Regex Split Node, but it didn’t work. Maybe i used the wrong Formula. I used this one: (.*)
Thank you in advance!
You can use a String Manipulation-Node with »removeChars($XYZ$, “()”)« and afterwards convert it to a number with a String To Number-Node.
Ansgar
3 Likes
ipazin
April 10, 2020, 2:08pm
#3
Hi there @Milovanova ,
although you are not splitting cell this is syntax you can use in Regex Split node:
[\(]([0-9]+)[\)]
Br,
Ivan
2 Likes
ipazin:
[\(]([0-9]+)[\)]
Hi
square bracket are not necessary in regex pattern if you know that parentheses are always present.
You can write:
(([0-9]+))
ipazin
May 11, 2020, 2:07pm
#6
Hi @pigreco ,
don’t understand your comment
Br,
Ivan
There was a problem with escape of escape regex.
I mean that when you write [\(] you are defining a set with a single char: (
If you know that the string start with ( and end with ), your regular expression can be \(([0-9]+)\) (without square brackets over round brackets)
1 Like
ipazin
May 11, 2020, 3:42pm
#8
Hi @pigreco ,
I see now what you are thinking. You are right. Tnx!
Br,
Ivan
1 Like
system
closed
November 10, 2020, 3:54am
#9
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.