Checklist for parenthesis

Hi folks!

I have found an old topic about this, but I could not replicate the results in my work, so I have to ask it again, sorry.

I would like to create a checklist to find any amount of missing pairs of parenthesis in target. So far I am using this one:
Source: “(.)"
Target: -"(.
)”
Power Search: on
Mode: Regex case sensitive

It works well when there are no parenthesis in target at all, but I must search for cases where the target has not the same amount of pairs of parenthesis as the source.

Thanks in advance,
Sílvia

Hi Silvia,

This search should find mismatches of segments that contain only one parenthesis.

Source: "\([^\)]+\)"
Target: -"\([^\)]+\)"
Search mode: Regex
PowerSearch: on

To detect segments with two parentheses in source you would use the following one:

Source: "\([^\)]+\)\(*\([^\)]+\)"
Target: -"\([^\)]+\)\(*\([^\)]+\)"
Search mode: Regex
PowerSearch: on

Best regards,
Oscar.

Thanks, Oscar.

One more question: your second expression will not work if source has three or more pair of parentheses but target has less than that, right?

Best regards,
Sílvia

You need to create a checklist entry for each number of parentheses in source:

Segments with 3 parentheses:

Source: "\([^\)]+\)\(*\([^\)]+\)\(*\([^\)]+\)"
Target: -"\([^\)]+\)\(*\([^\)]+\)\(*\([^\)]+\)"
Search mode: Regex
PowerSearch: on

Segments with 4 parentheses:

Source: "\([^\)]+\)\(*\([^\)]+\)\(*\([^\)]+\)\(*\([^\)]+\)"
Target: -"\([^\)]+\)\(*\([^\)]+\)\(*\([^\)]+\)\(*\([^\)]+\)"
Search mode: Regex
PowerSearch: on

and so on

That’s what I thought, Oscar. Thank you very much!

Un abrazo,
Sílvia