Hi,
I need to split a string based on a character(H) and that should go to below row as mentioned in screenshot,
please find the input:
Input
Text
HS12389 HP236789 HWE375634
HG3256798 HH1348946
HR167890 HR1234890 HD128900 HR347890
HN3256798 HK1348946
OUTPUT
HS12389
HP236789
HWE375634
HG3256798
HH1348946
HR167890
HR1234890
HD128900
HR347890
HN3256798
HK1348946
Yoichi
(Yoichi)
2
Hi,
I suppose you can achieve it by split whitespaces as the following.
arrayString = System.Text.RegularExpressions.Regex.Split(text,"\s")
If you need to split by whitespaces before “H”, the following will work.
arrayString = System.Text.RegularExpressions.Regex.Split(text,"\s(?=H)")
Regards,
Manish540
(Manish Shettigar)
3
Hi @Manish540,
The issue is resolved but small question from same .i have one more column to same
which is Date it should match with the Text column as below
Input
| Text |
Date |
| HS12389 HP236789 HWE375634 |
13-Mar |
| HG3256798 HH1348946 |
14-Mar |
| HR167890 HR1234890 HD128900 HR347890 |
15-Mar |
| HN3256798 HK1348946 |
16-Mar |
|
|
|
|
|
|
|
|
|
|
| OUTPUT |
|
| HS12389 |
13-Mar |
| HP236789 |
13-Mar |
| HWE375634 |
13-Mar |
| HG3256798 |
14-Mar |
| HH1348946 |
14-Mar |
| HR167890 |
15-Mar |
| HR1234890 |
15-Mar |
| HD128900 |
15-Mar |
| HR347890 |
15-Mar |
| HN3256798 |
15-Mar |