Why search "[" in xpp "{" also given?

Hi there,

I was asked to write a simple script to check certain things including searching special characters like "[" and "]" which are not supposed to exist at all at the final stage. It works except when it searches "[" (and "]") it also comes back with "{" (and "}"). "{" and "}" are supposed to be OK since they are part of macro. Like the screen cap below. Why is that? Is there a way say using character code (the number is ??) or other I can do this?

 

Screenshot of Trados Studio interface showing an error message with special characters highlighted in red. 

 

We are using XPP 8.4C.1 SP#5 and here is the code I use for searching ..

# check '['
if ($l =~ /\[/) {

...

}

# check ']'
if ($l =~ /\]/) {

....

}

 

Appreciate if anyone can help and many thanks in advance. Kwan



Generated Image Alt-Text
[edited by: Trados AI at 5:10 AM (GMT 0) on 5 Mar 2024]
emoji