# Can we use textSearchInit(pattern, mode \[, searchOptions\]) for a regex as pattern?

**URL:** <https://pdfjs.community/t/can-we-use-textsearchinit-pattern-mode-searchoptions-for-a-regex-as-pattern/409>\
**Category:** Technical Support\
**Created:** [December 8, 2020, 11:21am UTC](https://pdfjs.community/t/can-we-use-textsearchinit-pattern-mode-searchoptions-for-a-regex-as-pattern/409 "2020-12-08T11:21:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![himani.sharma](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@himani.sharma](https://pdfjs.community/u/himani.sharma)\
**Post date:** [December 15, 2020, 6:07am UTC](https://pdfjs.community/t/can-we-use-textsearchinit-pattern-mode-searchoptions-for-a-regex-as-pattern/409/3 "2020-12-15T06:07:40Z")

</div>

Hey Logan ,

Thanks a lot! This really solved the problem I was having.

---

_[View the full topic](https://pdfjs.community/t/can-we-use-textsearchinit-pattern-mode-searchoptions-for-a-regex-as-pattern/409)._
