# Xbench's Regex Matching Limitations

**URL:** https://forum.xbench.net/t/xbenchs-regex-matching-limitations/1177
**Category:** Technical Support
**Created:** [July 22, 2024, 10:26am UTC](https://forum.xbench.net/t/xbenchs-regex-matching-limitations/1177 "2024-07-22T10:26:10Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jixich93](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/jixich93/32/427_2.png) [@jixich93](https://forum.xbench.net/u/jixich93)
#### Post date: [July 22, 2024, 10:26am UTC](https://forum.xbench.net/t/xbenchs-regex-matching-limitations/1177/1 "2024-07-22T10:26:10Z")

</div>

Hi team

As far as I know, Xbench has some limitations when there are multiple matches of a Regex.

for example,  
_Any text Regex, something else Regex, end._

Xbench will match the first Regex and stop matching, causing the second Regex to be missed.  
Am I right?

I would like to know if we have fixed this.

---

<div class="post-metadata">

### Author: ![omartin](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/omartin/32/82_2.png) [@omartin](https://forum.xbench.net/u/omartin)
#### Post date: [July 22, 2024, 10:44am UTC](https://forum.xbench.net/t/xbenchs-regex-matching-limitations/1177/2 "2024-07-22T10:44:08Z")

</div>

It would be necessary to repeat the regex to find more than 1 match. For instance, the following search allows you to find the same regex twice in the same segment:  
Source: File has been changed - Recreate File  
Target: El archivo ha cambiado; volver a crear el fichero.

Search:  
Source: `"(<file>)=1.*<@1>"`  
Target: `"<archivo>.*<archivo>"`

---

<div class="post-metadata">

### Author: ![jixich93](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/jixich93/32/427_2.png) [@jixich93](https://forum.xbench.net/u/jixich93)
#### Post date: [July 23, 2024, 2:03am UTC](https://forum.xbench.net/t/xbenchs-regex-matching-limitations/1177/3 "2024-07-23T02:03:29Z")

</div>

Hi Omartin,

Actually, we are trying to use Xbench + Checklist as an integrated QA tool to replace all other QA tools, but this bug is a major obstacle.  
Can this issue be fixed?

---

<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: [July 24, 2024, 10:41am UTC](https://forum.xbench.net/t/xbenchs-regex-matching-limitations/1177/4 "2024-07-24T10:41:29Z")

</div>

Xbench does not count instances because languages have different rules. For example, English is less prone to use pronouns than other languages such as French or Spanish so it is not uncommon that a name that appears twice in the English source appears only once in the target, with a pronoun appearing in the second instance. So flagging this would produce many false positives for some languages.

With Xbench checklists you have the resource of use a structure like the one defined by @omartin for tag-like stuff where the instance count matters and also have the resource to add banned terms to the target for those case in which the instance missing is not a pronoun but a wrong term.

---

<div class="post-metadata">

### Author: ![jixich93](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/jixich93/32/427_2.png) [@jixich93](https://forum.xbench.net/u/jixich93)
#### Post date: [July 31, 2024, 11:24am UTC](https://forum.xbench.net/t/xbenchs-regex-matching-limitations/1177/5 "2024-07-31T11:24:04Z")

</div>

Hi pcondal

But if we don’t know the maximum number of times, doesn’t that mean this solution might not work, or that we need to add enough matches to get the result we want?

Also the terms may not be added in a timely manner, so there are some risks with this method as well…

---

<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: [July 31, 2024, 5:38pm UTC](https://forum.xbench.net/t/xbenchs-regex-matching-limitations/1177/6 "2024-07-31T17:38:07Z")

</div>

The approach with checklists is to create one checklist item with each case, n=1, n=2, etc, until you think you are covered.

Another way to count instances would be with a [custom QA plugin](https://docs.xbench.net/programmer-reference-qa-plugins/), but that would require Windows programming skills in your team.
