# FAQ: How do I check for values between parentheses in a field name?

**URL:** <https://connective.celigo.com/t/faq-how-do-i-check-for-values-between-parentheses-in-a-field-name/1210>\
**Category:** Integrator.io\
**Tags:** handlebars, javascript, export\
**Created:** [February 9, 2021, 8:06pm UTC](https://connective.celigo.com/t/faq-how-do-i-check-for-values-between-parentheses-in-a-field-name/1210 "2021-02-09T20:06:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![courtneyjordan](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@courtneyjordan](https://connective.celigo.com/u/courtneyjordan)\
**Post date:** [February 9, 2021, 8:06pm UTC](https://connective.celigo.com/t/faq-how-do-i-check-for-values-between-parentheses-in-a-field-name/1210/1 "2021-02-09T20:06:46Z")

</div>

Q: I need to check whether there is 1 or more numbers between parentheses (parens) in a field, title. If the field value does have a parens, I want to append two fields to it, companyname and clientid.

A:   
We'll use this example record:

```
{"items": [{ "title": "Test-Title (123)", "companyname": "Acme", "clientid": "10" }, { "title": "ExpandedTitle", "companyname": "Acme", "clientid": "5" }]}
```

Check for an opening paren in the title, then for a digit following the ( paren.

```
{{#each items}}{{#contains title (regexMatch title "\(\d+\)" 1 "g")}}{{title}}{{else}}{{title}} - {{companyname}} ({{clientid}}){{/contains}}{{/each}}
```

This will result in:

```
Test-Title (123)ExpandedTitle - Acme(5)
```

Here, [#contains](https://docs.celigo.com/hc/en-us/articles/360039326071-Handlebars-helper-reference#contains) checks that the title field has a value, then the nested [regexMatch](https://docs.celigo.com/hc/en-us/articles/360039326071-Handlebars-helper-reference#regexMatch) handlebar function looks to see whether that value contains any parens. It looks for an open paren "(", a digit, then it looks for any extra digits "\d+\", then a close paren ")". If a paren does exist in the value and it contains numbers between the parens, the title is appended with -Acme(5). This is the companyname and clientid above.

If you are proficient in JavaScript, you can set up a preSave hook on the export step. Learn more about [scripts](https://celigosuccess.zendesk.com/hc/en-us/articles/360007562931-Scripts).
