Regex tagger for straight bracket
Thread poster: Omer Shani
Omer Shani
Omer Shani  Identity Verified
Israel
Local time: 09:01
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: 09:01
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: 09:01
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: 09:01
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






Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »