Hi friends,
I have a problem with some list of strings that I want to parse into multiple columns but my Regex doesn't work properly. This is how it likes:
\s(\d*\.*\d*)\s([\w]*)\s\w*\s(\d*)\s([\w]*)
And this is an example of my results:
Producto Desc | Regex1 | Regex2 | Regex3 | Regex4 |
SELOKEN ZOK 95 MG LIB PROL ORAL 20 GRAG 0803 | 20 | GRAG | 803 | |
SELOPRES ZOK 95/12.50MG ORAL 20 TAB 0810 | 20 | TAB | 810 | |
TALARIC 30 CAPS 0608 | [Null] | [Null] | [Null] | [Null] |
SULFATO-MAG 10 % 100X10ML AMP (HIJO) 1457 | ||||
CONCOR 1.25 MG ORAL 30 TAB 5021 | 1.25 | MG | 30 | TAB |
INDERALICI 80 MG ORAL 20 TAB 2561 | 80 | MG | 20 | TAB |
TENORETIC 50/12.5 MG ORAL 28 TAB 2288 | 28 | TAB | 2288 | |
TENORETIC 100/25MG ORAL 28 TAB 2516 | 28 | TAB | 2516 | |
OPENVAS CO 20/12.5MG ORAL 14 TAB 0325 | ||||
AMLODIPINO 5 MG C/10 TAB GI 3237 | [Null] | [Null] | [Null] | [Null] |
Each part of the group is represent by a diffferent color assuming how should be working my code to group by.
I hope you can help me to resolve this problem.
Thank you for readme.
Solved! Go to Solution.
Rows 3 and 4 are a bit tricky but I was able to get the rest of the rows using this:
\s([\d\/\.]+)\s*(M\w)*\s[^\d]+(\d{2})\s(\w{3,4})\s
I highly recommend the website regex101.com when trying to solve problems like this.