Hi
input:
| data |
| 456 //SG201AB TGHFG01 |
| ABCF //345-ASDTG |
| 001 //123123 |
| ABC//5690AB 90111 |
| RRR //5089--ASD JKLP |
output should should start from // till the next space
i have tried using this formula (\/\/\w+?)(?=\s), it is not giving expected results
| Expected Output |
| //SG201AB |
| //345-ASDTG |
| //123123 |
| //5690AB |
| //5089--ASD |
#regex
Solved! Go to Solution.
| D_1 | data |
| AA | 456 //SG201AB TGHFG01 |
| AA | ABCF //345-ASDTG |
| BB | 001 //123123 |
| SAR | ABC //5690AB 90111 |
| SAR | RRR //5089--ASD JKLP |
whenever there is SAR, it should be
| Expected Output |
| //SG201AB |
| //345-ASDTG |
| ABC //123123 |
| RRR //5690AB |
| //5089--ASD |
Hi, @BRRLL99
The output of line 3 are you sure it's not //123123 but ABC //123123? and there's no SAR here.
SAR will be in separate column
when there is SAR
it should pick entire ABC //123123 { before text// till the next space}
for others it should be only //123123
Can you give a longer list of sample data @BRRLL99 ? Maybe give us an excel list so we can see and make it dynamic...?
| D_1 | data |
| GBP | 456 //SG201AB TGHFG01 |
| INR | ABCF //345-ASDTG |
| SDF | 001 //123123 |
| SAR | PR4501 //5690AB 90111 |
| SAR | R001AB //5089--ASD JKLP |
| USD | GHF // ABC001 |
Expected output:
| data |
| //SG201AB |
| //345-ASDTG |
| //123123 |
| PR4501 //5690AB |
| R001AB //5089--ASD |
| // ABC001 |
Hi, @BRRLL99
FYI.
use the formula :
REGEX_Replace([data], '^(\S+?)\s+(\/\/\s?[[:alnum:]\-]+?)(?=\s|$).*', IIF([D_1] = 'SAR', '$1 $2', '$2'))
