# Using regex to find the id

**URL:** <https://forum.katalon.com/t/using-regex-to-find-the-id/10116>\
**Category:** Web Testing\
**Tags:** web-testing, katalon-studio\
**Created:** [April 5, 2018, 2:49am UTC](https://forum.katalon.com/t/using-regex-to-find-the-id/10116 "2018-04-05T02:49:15Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [April 5, 2018, 6:42am UTC](https://forum.katalon.com/t/using-regex-to-find-the-id/10116/4 "2018-04-05T06:42:34Z")

</div>

Alternative to Regexp, you can use XPath expression:  
You can select a div element with id=“Donors\_1233klf323sd\_Ti” by the following xpath:

```auto
//div[starts-with(@id, "Donors_") and substring(@id, string-length(@id) - string-length('_Ti')+1)="_Ti"]

```

---

_[View the full topic](https://forum.katalon.com/t/using-regex-to-find-the-id/10116)._
