# Parsing out a date or phrase

**URL:** <https://forum.openrefine.org/t/parsing-out-a-date-or-phrase/1035>\
**Category:** Support and Helpdesk\
**Created:** [October 27, 2023, 4:48pm UTC](https://forum.openrefine.org/t/parsing-out-a-date-or-phrase/1035 "2023-10-27T16:48:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lydia\_Schlais](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.openrefine.org/lydia_schlais/32/662_2.png) [@Lydia\_Schlais](https://forum.openrefine.org/u/Lydia_Schlais)\
**Post date:** [October 27, 2023, 4:48pm UTC](https://forum.openrefine.org/t/parsing-out-a-date-or-phrase/1035/1 "2023-10-27T16:48:45Z")

</div>

I am try to parse out the data and the phrase "Written Assessment" out of another column but cannot come up with the code string.

sites/GPSR/2023 Written Assessments/EU Directives

---

<div class="post-metadata">

**Author:** ![ostephens](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.openrefine.org/ostephens/32/8_2.png) [@ostephens](https://forum.openrefine.org/u/ostephens)\
**Post date:** [November 3, 2023, 3:27pm UTC](https://forum.openrefine.org/t/parsing-out-a-date-or-phrase/1035/2 "2023-11-03T15:27:42Z")

</div>

Hi @Lydia_Schlais

Apologies for the delay in responding. There are several different ways you could approach this, and the best approach will depend on what your data is like over the entire set of records. If all the occurrences look like:

`sites/GPSR/<FOUR DIGIT YEAR> Written Assessments/EU Directives`

Then the simplest approach is probably to use the function  
`Edit column -> Add column based on this column`  
and then the GREL  
`value.split("/")[2]`

This will break up the original string on each forward slash, and then pick the 3 item from the resulting array (list of values). The `[2]` picks the 3rd value because it starts counting at zero for the first item in the array

If the data isn't as consistent as this please do share more information and examples and I can provide some alternative approaches

Owen
