Regular expression to look for malformed placeholders

Hi everyone,

I have a file where the source contains 2 types of important placeholders:

  1. {Platform}|platform(XXXX, XXXX, XXXX)

Example: {Platform}|platform(controller, controller, mouse/keyboard)

  1. {Gender}|gender(“XXXX”, “XXXX”)

Example: {Gender}|gender(“boy”, “girl”)

I need a check to make sure that these placeholders maintain the same structure in the target, where only XXX would differ.

Can you help me?

Try the following searches:

  1. Platform placeholder:
    Source: "(\{Platform\}\|platform)=1\([^,]+, [^,]+, .+\)"
    Target: -"@1\([^,]+, [^,]+, .+\)"
    Search mode: Regular Expressions
    PowerSearch: On
  2. Gender placeholder:
    Source: "(\{Gender\}\|gender)=1\(""[^""]+"", ""[^""]+""\)"
    Target: -"@1\(""[^""]+"", ""[^""]+"" \)"
    Search mode: Regular Expressions
    PowerSearch: On

Hi omartin,

the platform one worked, thanks a lot!

For the gender one, I get the error:

Try the above fixed search.