TermInjector seems to trip on em-spaces

,

I am a fond user of TermInjector, but I sometimes struggle with the POSIX flavor of Regex it uses...

In this case, I have words (product names) followed by an em space:

Screenshot highlighting 'em' space character in Trados Studio with Unicode U+2003.

I set up TermInjector to insert the target language product name at the place where another target language product name is:

Screenshot of TermInjector settings in Trados Studio showing replacement rules for product names with spaces.

This works fine if "Product A" is followed by a space, but it fails if it is followed by an em space. I can't convert em spaces to spaces as this would mess up the layout of the target file.

Why is that happening, and is there a way to make it work?

Daniel

PS:

Regexbuddy still matches this:

Screenshot of RegexBuddy matching 'Product-A' followed by an 'em space' character.

...but does not regard the em space as space - how does TermInjector handle this? (It does match the string if instead of "\s" it has a "\b".)

Screenshot of RegexBuddy with a red line indicating a failed match for 'Product-A' followed by an 'em space'.



Generated Image Alt-Text
[edited by: Trados AI at 8:14 PM (GMT 0) on 28 Feb 2024]
emoji
Parents
  • It's been a long time since I've worked with/on TermInjector, but I think you might be able to do what you want by adding the em space to the Word boundary characters list in the Advanced part of TermInjector settings.

    I have started working on a new plugin with similar functionalities as in TermInjector (but with normal .NET regular expressions), but I'm not sure when it'll be ready for publication. The regex language in the original TermInjector is pretty limited, but it does have the benefit of being able to match any number of regexes quickly (although I now doubt whether anyone ever needed that much regex handling speed).

Reply
  • It's been a long time since I've worked with/on TermInjector, but I think you might be able to do what you want by adding the em space to the Word boundary characters list in the Advanced part of TermInjector settings.

    I have started working on a new plugin with similar functionalities as in TermInjector (but with normal .NET regular expressions), but I'm not sure when it'll be ready for publication. The regex language in the original TermInjector is pretty limited, but it does have the benefit of being able to match any number of regexes quickly (although I now doubt whether anyone ever needed that much regex handling speed).

Children