# Delete rows based on part of string value?

**URL:** <https://forum.openrefine.org/t/delete-rows-based-on-part-of-string-value/304>\
**Category:** Support and Helpdesk\
**Created:** [January 4, 2023, 10:48pm UTC](https://forum.openrefine.org/t/delete-rows-based-on-part-of-string-value/304 "2023-01-04T22:48:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rachel\_Helps](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.openrefine.org/rachel_helps/32/143_2.png) [@Rachel\_Helps](https://forum.openrefine.org/u/Rachel_Helps)\
**Post date:** [January 4, 2023, 10:48pm UTC](https://forum.openrefine.org/t/delete-rows-based-on-part-of-string-value/304/1 "2023-01-04T22:48:22Z")

</div>

Hi, I’m cleaning up my massviews analysis data, but this is a question I need to know for other projects. In this case, I want to delete every row that has “Talk:” as the first five characters in a certain value. Is there a way to facet based on matching to a certain string?

---

<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:** [January 4, 2023, 11:11pm UTC](https://forum.openrefine.org/t/delete-rows-based-on-part-of-string-value/304/2 "2023-01-04T23:11:30Z")

</div>

Hi @Rachel_Helps

Yes you can do this in a few ways but I’d suggest:

1. Choose Facet → Custom text facet
2. In the expression box enter `value.startsWith("Talk:")`

This will create a true/false face where `true` will be all the rows where the cell text starts with the specified string

Best wishes  
Owen

---

<div class="post-metadata">

**Author:** ![thadguidry](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.openrefine.org/thadguidry/32/653_2.png) [@thadguidry](https://forum.openrefine.org/u/thadguidry)\
**Post date:** [January 4, 2023, 11:27pm UTC](https://forum.openrefine.org/t/delete-rows-based-on-part-of-string-value/304/3 "2023-01-04T23:27:18Z")

</div>

**Text Filter** is another alternative (where you could still use the All → Flag/Star rows or even just directly Edit rows → Remove matching rows). You can use a regular expression such as starts with `^` and then your chars ex. `Talk:` so completely the expression would be `^Talk:`.

---

<div class="post-metadata">

**Author:** ![Rachel\_Helps](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.openrefine.org/rachel_helps/32/143_2.png) [@Rachel\_Helps](https://forum.openrefine.org/u/Rachel_Helps)\
**Post date:** [January 6, 2023, 4:58pm UTC](https://forum.openrefine.org/t/delete-rows-based-on-part-of-string-value/304/4 "2023-01-06T16:58:21Z")

</div>

> [@ostephens](#):
>
> value.startsWith("Talk:")

thank you! I was having the hardest time googling this.
