How can I use Regex to identify a placeable?

Hi, 

I realise - too late - that in a huge file with alphanumeric strings recognised as placeables, that strings needing translation have incorrectly autopropagated without being translated.

For example:

ALFA-1-ANTITRIPSINA

PROTEINASA-3

(to name but a few).

I'd like to filter by

1. All segments containing a placeable (plus any other content).

2. All segments containing a placeable only.

Can anyone suggest a Regex string that would catch Studio placeables that I'd be able to use in the Advanced Display Filter and/or in QA checker>Regular expressions?

I've got as far as ([A-Z]|\d)(-|–|_|\.)([A-Z]|\d) but it's not specific enough (e.g., it also catches \d-\d).

Many thanks,

Emma

Parents Reply
  • Hi Emma,

    Ok.. I looked at this a little bit better. First point to note is that this is not a capturing expression, so Ctrl+F will not return what you expected. It's only a lookahead to see if the expression can be matched and then filter accordingly.

    If you want Ctrl+F to work too then try this:

    \b(?=\S*[a-zA-Z])(?=\S*[0-9])\b\S*

    This adds the bit to select your text after asserting it can be found. If you want to use it in QA then you would also create a back reference to remember what it found:

    \b(?=\S*[a-zA-Z])(?=\S*[0-9])\b(\S*)

    Make sense?

    Then to make this work in all your scenarios I'd need to see some more examples... but perhaps this will help you?

    Regards

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children