# Need help on Getting Index for "(" and ")"

**URL:** <https://developer.sailpoint.com/discuss/t/need-help-on-getting-index-for-and/99207>\
**Category:** SHF Discussion and Questions\
**Tags:** identityiq, apis, identity-security-cloud, workflows\
**Created:** [January 28, 2025, 9:55am UTC](https://developer.sailpoint.com/discuss/t/need-help-on-getting-index-for-and/99207 "2025-01-28T09:55:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PrashRV](https://avatars.discourse-cdn.com/v4/letter/p/ba9def/32.png) [@PrashRV](https://developer.sailpoint.com/discuss/u/PrashRV)\
**Post date:** [January 28, 2025, 9:55am UTC](https://developer.sailpoint.com/discuss/t/need-help-on-getting-index-for-and/99207/1 "2025-01-28T09:55:41Z")

</div>

Hi ,

can someone help on the below error, i see error " Invalid regex for “(” and “)” but when i fetch “-”, getting Index of that on the string.

if we cant get Index for the brackets then what is the other way to do it.  
Step: Define Variable

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/3/6/36c2d8700f9ba8994897d9b4476ad35873ac86e1.png)  
Testing :  
 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/1/9/19e85053f5096628ebc3d2042a0af05f428df485.png)

Thanks  
Prashanth

---

<div class="post-metadata">

**Author:** ![rpriya](https://avatars.discourse-cdn.com/v4/letter/r/bc79bd/32.png) [@rpriya](https://developer.sailpoint.com/discuss/u/rpriya)\
**Post date:** [February 14, 2025, 2:30pm UTC](https://developer.sailpoint.com/discuss/t/need-help-on-getting-index-for-and/99207/2 "2025-02-14T14:30:18Z")

</div>

Can you add a backslash before ( in pattern, bracket needs escape character

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [April 15, 2025, 2:30pm UTC](https://developer.sailpoint.com/discuss/t/need-help-on-getting-index-for-and/99207/3 "2025-04-15T14:30:30Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
