# String split after a pattern

**URL:** <https://forum.uipath.com/t/string-split-after-a-pattern/510459>\
**Category:** Studio\
**Tags:** datatable, question, studio, regex, system, activities\
**Created:** [January 25, 2023, 8:29am UTC](https://forum.uipath.com/t/string-split-after-a-pattern/510459 "2023-01-25T08:29:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nagaabhishekreddy.c](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/nagaabhishekreddy.c/32/264554_2.png) [@nagaabhishekreddy.c](https://forum.uipath.com/u/nagaabhishekreddy.c)\
**Post date:** [January 25, 2023, 8:29am UTC](https://forum.uipath.com/t/string-split-after-a-pattern/510459/1 "2023-01-25T08:29:29Z")

</div>

Hi all, I have a structured string in a single line. I have to split the string after date is found

## Example

FIDEL A ZELAYA CA A1234567 01/01/1986 ALEX SOTO CA 04454033 06/08/2000 JOSE M SOTO CHAVEZ CA EXCLUDED002 01/01/1979 FIDEL A ZELAYA CA EXCLUDED05 01/01/1986 MARIA C VELASCO SERNA FD 1 10/11/1966 VICTORIANO SOTO CHAVEZ FD 2 01/05/1966

## Output

FIDEL A ZELAYA CA A1234567 01/01/1986  
ALEX SOTO CA 04454033 06/08/2000  
JOSE M SOTO CHAVEZ CA EXCLUDED002 01/01/1979  
FIDEL A ZELAYA CA EXCLUDED05 01/01/1986  
MARIA C VELASCO SERNA FD 1 10/11/1966  
VICTORIANO SOTO CHAVEZ FD 2 01/05/1966

Thank you

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [January 25, 2023, 8:34am UTC](https://forum.uipath.com/t/string-split-after-a-pattern/510459/2 "2023-01-25T08:34:55Z")

</div>

Hi,

How about the following expression?

```
System.Text.RegularExpressions.Regex.Matches(yourString,".*?\d{2}/\d{2}/\d{4}\b").Cast(Of System.Text.RegularExpressions.Match).Select(Function(m) m.Value).ToArray()

```

 ![image](https://global.discourse-cdn.com/uipath/original/4X/9/a/f/9af66544353f7d34856ca9fc1c03d4d482a69fe4.png)

[Sample20230125-8L.zip](https://forum.uipath.com/uploads/short-url/xo1oQgvblOhKbHaTGjPpZsaKXte.zip) (2.4 KB)

Regards,

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [January 28, 2023, 8:35am UTC](https://forum.uipath.com/t/string-split-after-a-pattern/510459/3 "2023-01-28T08:35:54Z")

</div>

Closed on January 28, 2023, 8:35am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
