Help with regex verification (Source but not target vs. Source but not target - count)

I have a project with hundreds of expressions like this one:

Source: size of 31.49"×25.98"

The localized translation should be: 31,49 x 25,98 pulg.

This is what I'm using in the QA check: Source is [0-9]\.[0-9]; target is [0-9]\,[0-9]; Regex condition: 'Report if both source and target match but with different coun'

Sometimes there's 2 or more decimal numbers. However, this doesn't work when there's only 1 instance of the expression. So if the segment only has 1 number, the condition is not triggered. I would have to use 'Report if source matches but not the target'.

Is there an explanation for this and what would be the difference between these two conditions for this particular case.

Thanks.

Parents
  • Hi Claudia,

    "Report if both source and target match but with different count"

    For the above condition to match, both the source and target need to find at least 1 match.
    This means if there is NO match in the target, it will NOT be triggered!

    However, "Report if source matches but not the target" means there are ZERO matches in the target.
    That is the difference between the two.

    I hope that answers your question!

     

Reply
  • Hi Claudia,

    "Report if both source and target match but with different count"

    For the above condition to match, both the source and target need to find at least 1 match.
    This means if there is NO match in the target, it will NOT be triggered!

    However, "Report if source matches but not the target" means there are ZERO matches in the target.
    That is the difference between the two.

    I hope that answers your question!

     

Children