# How to find multi domain errors?

**URL:** https://forum.xbench.net/t/how-to-find-multi-domain-errors/705
**Category:** Technical Support
**Created:** [December 7, 2020, 10:47pm UTC](https://forum.xbench.net/t/how-to-find-multi-domain-errors/705 "2020-12-07T22:47:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bbs\_knock](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/bbs_knock/32/271_2.png) [@bbs\_knock](https://forum.xbench.net/u/bbs_knock)
#### Post date: [December 7, 2020, 10:47pm UTC](https://forum.xbench.net/t/how-to-find-multi-domain-errors/705/1 "2020-12-07T22:47:42Z")

</div>

Hi there,

I need to check domain errors. For instance, source: abcdef.in target: abcdef.mx.  
I created a rule:  
SOURCE: “(abcdef(.[a-zA-Z]{2,4}){1,3})=1”  
TARGET: -@1  
Search mode: Regex  
Powersearch: ON

It works, but only for the first domain name in the text. I don’t know how to check multi domain name errors. For instance,  
Source: [abcdef.com](http://abcdef.com) _abcdef.in_ [abcdef.cn](http://abcdef.cn)  
Target: [abcdef.com](http://abcdef.com) _[abcdef.cn](http://abcdef.cn)_ [abcdef.cn](http://abcdef.cn)

Source: [abcdef.com](http://abcdef.com) abcdef.in _[abcdef.cn](http://abcdef.cn)_  
Target: [abcdef.com](http://abcdef.com) abcdef.in _[abcdef.co.uk](http://abcdef.co.uk)_

Appreciate any help and advice.

Have a fantastic day!

---

<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: [December 8, 2020, 8:45am UTC](https://forum.xbench.net/t/how-to-find-multi-domain-errors/705/2 "2020-12-08T08:45:48Z")

</div>

The search should include as variables as domains are in the source text.

For instance, the following search should find all segments that contain two domains in source but at least one domain does not match in target:

Source: `"(<[a-z0-9]+(\-?[a-z0-9]+)*\.)+[a-z]{2,}>)=1.*(<[a-z0-9]+(\-?[a-z0-9]+)*\.)+[a-z]{2,}>)=2"`  
Target: `-@1 OR -@2`  
Search mode: Regex  
PowerSearch: on.

The regular expression `<[a-z0-9]+(\-?[a-z0-9]+)*\.)+[a-z]{2,}>` should find valid domain names according to [O’Reilly](https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html). The regex has been adapted to match Xbench regex syntax.
