Forum Academy Marketplace Showcase Pricing Features

Regex: How to KEEP everything after '(Original)'?

The Google API returns reviews as follows:

(Translated by Google) Professional repair of my motorhome with a super fast service TOP!!!

Vakkundige reparatie van mijn motorhome met een supersnelle service TOP!!!

Or in other words, first the translation, then the original review.

I’d like to only display the Original review in my app, thus everything starting from (Translated by Google) until and including (Original) should be gone.

Which expression should I write in Regex? Thanks!

Anyone an idea?

I tried using this pattern: [^)]+$

However, when the reviewer writes a β€˜)’ in his review, it removes too much text :confused:

You can use the β€œFind & Replace” to replace the text you want to delete by nothing…

Yes true. But as the text is dynamic between (Translated by Google) and (Original), I believe this is not an option now.

Basically, I’d need an expression in regex that says β€˜Delete everything before (Original), as well as (Original) itself’.

Hope this helps. :slight_smile:

Don’t you have access to the original text??
If so, you will replace 3 things by β€œβ€

  • Replace β€œ(Translated by Google)” by β€œβ€
  • Replace β€œ(Original)” by β€œβ€
  • Replace the original text by β€œβ€

Use the new function :split by (original):last item

1 Like

Thank you! It works perfectly now :smiley:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.