Hi All,
Could you please help me writing regex to bring Column "Type" based on ID?
ID | Type |
912828B0 | GC |
10054816 | GC |
CORPHYGC | SP |
@Sarath27 how are you assigning the Type based on the ID?
@Sarath27 I think I know what you are asking, but if we are to identify the type based on the number and letter patterns, I'm thinking we will need many more examples. A set of 3 does not provide much variety. If it either starts with a number or a letter and those are the only 2 options, you can even use a formula tool with:
IF IsNumber(Left([ID],1))
THEN "GC"
ELSE "SP"
ENDIF
For RegEx, you would need to use match and then populate the value in another column (or replace if you no longer need the ID data. For RegEx match "\d.+" would identify the strings starting with a number.
@Sarath27 can you explain the logic behind adding Column Type.
@flying008 that will only work if all of the characters in the SP type are letters. If they start with letters but include a number, it will consider it SP. This is also why I asked for more examples or logic from @Sarath27