Welcome, Guest Login

Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Regular expression help needed

Martin Guttinger Nov 08, 2017 08:26PM CET

I would like to create a regular expression in Memsource that parses the string between colons in the msgstr line, i.e. the "Home", but does not parse the string between colons in the msgid line (which is the string's ID).

msgid "home"
msgstr "Home"

Thanks for your help.

Martin

Up 0 rated Down
Vaclav Balacek Nov 08, 2017 08:39PM CET Memsource Help Center Agent

Hi Martin,
This is a PO file, where msgid should be the source and msgstr is where the translations go.
If you want to process PO as TXT using regular expressions, you will find some good examples here.
These show situations when you need to import text “from – to”.
Please let us know if this helps.

Up 0 rated Down
Martin Guttinger Nov 08, 2017 09:43PM CET
Unfortunately, I am not an engineer, so I am struggling with the syntax. The file in question is a PO file but we are using a two line structure where the first line is the ID and the second the string that needs to be overwritten with the translation. Would you be willing to help me with the syntax?
Up 0 rated Down
Vaclav Balacek Nov 08, 2017 10:02PM CET Memsource Help Center Agent

Hi, it will be (?<=msgstr ").*(?=") in this case.

Up 0 rated Down
Martin Guttinger Nov 08, 2017 10:14PM CET
Thank you very much, Vaclav. Much appreciated.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
support@memsource.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete