Regex tagger for straight bracket
Thread poster: Omer Shani
Omer Shani
Omer Shani  Identity Verified
Israel
Local time: 00:08
Member (2012)
English to Hebrew
+ ...
Feb 13, 2020

Hi,

I'm trying to figure out the right regex tagger for segments with straight bracket, but every option I try, it turn out too greedy

An example for a segment:

Please use our portal |portallink| and this unique code |code|

Your assistance will be highly appreciated

Omer


 
mikhailo
mikhailo
Local time: 00:08
English to Russian
+ ...
| (pipe) sign is used as alternator in regexes in MQ Feb 13, 2020

Omer Shani wrote:

Hi,

I'm trying to figure out the right regex tagger for segments with straight bracket, but every option I try, it turn out too greedy

An example for a segment:

Please use our portal |portallink| and this unique code |code|

Your assistance will be highly appreciated

Omer


| (pipe) sign is used as alternator in regexes in MQ. So you should backslash it like \| to find «|» as simple sign.


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 00:08
English to Russian
If there is no space between the pipe signs, Feb 13, 2020

use \|(\w+)\|

If there is/are space(s) anywhere between the pipe signs, use [?>=\|][^|]+[?=\|]

[Edited at 2020-02-14 00:20 GMT]


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 00:08
English to Russian
Feb 14, 2020



[Edited at 2020-02-14 00:14 GMT]


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Regex tagger for straight bracket






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »