Hi,
I have been trying to find an answer to my scenario of how to split out the String part and Numeric part separately from a string containing number at a random position. To ease out this thing, number would only be at a single position. For example, 3 of the sample records are:
text1 abc pqr 98710
text2 21270
25836 text3 abc
text4 51271 abc
12121 text pqr
There surely wont be a scenario where I will have something like 12121 text pqr 12345 (Group of number occuring twice). Also, the placement of group of numbers can be at any place, starting, anywhere in middle or at the end. Is there a way I can extract those group of numbers in a seperate column?
Solved! Go to Solution.
Hi @Jasdev ,
Attached is an example showing how to do it.
I've created two regular expressions, the second one considering that you are going to have single digits alongside your texts, such as 'text1' and the first one not considering it.
Best,
Fernando Vizcaino
Does this (\d{5}) means wherever it find any group of numbers of length 5, it extracts them?
This group can be of any length more than 3 so what would the expression change into?
Also, if I need to have 2 columns, one with what you are generating and one of only text part?
I think below parse would solve my scenario but can you explain if (\d{2,}) means any group of number more than 2? Does it include 2 as well? My number group range can be anything more than 3. Also, how to have another column with textual part only?
It worked. Amazing. Thank you so much for such quick help.
User | Count |
---|---|
52 | |
27 | |
25 | |
24 | |
21 |