ApSIC Xbench Forum

How to find multi domain errors?

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 abcdef.in abcdef.cn
Target: abcdef.com abcdef.cn abcdef.cn

Source: abcdef.com abcdef.in abcdef.cn
Target: abcdef.com abcdef.in abcdef.co.uk

Appreciate any help and advice.

Have a fantastic day!

1 Like

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. The regex has been adapted to match Xbench regex syntax.

1 Like