Dear all,
Can some one help me to improve the Regex expression to solve the issue below:
I'd like to have the line 5 with the same quantity of character of above ones (only 8 characters)...
What do I need to do in my expression to achieve this?
Solved! Go to Solution.
hello @FabioP
One way to do this would be with a formula tool, and using the following:
PadLeft([RegExOut1], 17, 'X')
Hope this helps!
@FabioP is it always XX<Number><5 more characters> that you're looking for? Something like this will do if so:
(XX[^X]\w{5})
If not, can you provide the exact pattern you're looking for/expecting and more variations of incoming values?
Give this a shot...
.*?(X{1,2}[^X]\w{5})
@FabioP sure!
Hi @FabioP
Glad to hear!
Sure, that part is saying that it should match an X 1 or 2 times. I added that because I saw that one of your examples only had one X. If it should ALWAYS match on 2 X's, then adjust it to X{2}, which is the same as XX.
Hi, @FabioP
Perhaps rather than a complex regex, consider adding a formula tool after the Regex Tool with the following treatment:
Right([RegExOut1],8)
Regex Tool - parse - ([X]+\w{6})
Formula Tool - update RegExOut1 field with - Right([RegExOut1],8)
I hope you find this helpful - Cheers!
User | Count |
---|---|
106 | |
85 | |
76 | |
54 | |
40 |