# Trying to find source segments that start with "With"

**URL:** <https://forum.xbench.net/t/trying-to-find-source-segments-that-start-with-with/29>\
**Category:** Technical Support\
**Created:** [February 7, 2016, 4:51pm UTC](https://forum.xbench.net/t/trying-to-find-source-segments-that-start-with-with/29 "2016-02-07T16:51:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![XbenchUser](https://avatars.discourse-cdn.com/v4/letter/x/57b2e6/32.png) [@XbenchUser](https://forum.xbench.net/u/XbenchUser)\
**Post date:** [February 7, 2016, 4:51pm UTC](https://forum.xbench.net/t/trying-to-find-source-segments-that-start-with-with/29/1 "2016-02-07T16:51:45Z")

</div>

I can’t figure out how to write a regular expression to find source text/segment that starts with the word “With” in Xbench.

Could you tell me what the regex should look like?

---

<div class="post-metadata">

**Author:** ![pcondal](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/pcondal/32/305_2.png) [@pcondal](https://forum.xbench.net/u/pcondal)\
**Post date:** [February 7, 2016, 4:56pm UTC](https://forum.xbench.net/t/trying-to-find-source-segments-that-start-with-with/29/2 "2016-02-07T16:56:18Z")

</div>

If you wish to find all segments starting with “With”, please use the following regular expression:

`^With`

In Regex, the caret symbol (^) stands for _beginning of segment_.

---

<div class="post-metadata">

**Author:** ![srpicinini](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@srpicinini](https://forum.xbench.net/u/srpicinini)\
**Post date:** [March 27, 2016, 11:06pm UTC](https://forum.xbench.net/t/trying-to-find-source-segments-that-start-with-with/29/3 "2016-03-27T23:06:57Z")

</div>

If the user only wanted to find segments that begin with “with” but not that begin with “without”, the regex would be ^with\>, correct. On the other end (literally) if I want to find segments that end with the word with, the user would use with$, correct? Thanks

---

<div class="post-metadata">

**Author:** ![pcondal](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/pcondal/32/305_2.png) [@pcondal](https://forum.xbench.net/u/pcondal)\
**Post date:** [March 27, 2016, 11:16pm UTC](https://forum.xbench.net/t/trying-to-find-source-segments-that-start-with-with/29/4 "2016-03-27T23:16:39Z")

</div>

To force that the segment ends with the word “with”, you have to add the open angle bracket `<with$`
