use of regular expressions on Textpad
Autor wątku: Angel Llacuna
Angel Llacuna
Angel Llacuna  Identity Verified
Hiszpania
Local time: 21:17
angielski > hiszpański
May 23, 2018

How can I specify a regular expression on Texpad that searches for the second occurrence of a tab character on each row of a plain text file ?

 
Endre Both
Endre Both  Identity Verified
Niemcy
Local time: 21:17
angielski > niemiecki
Test this May 23, 2018

Never heard of Texpad before and didn't find information on the regex flavour it uses, but you could try something like this:

^[^\t]*\t[^\t]*\t

This is predicated on the regex engine representing tabs as \t and allowing for excluding character ranges, e.g. [^\t] meaning any character except tab.

Also, it matches the entire row up to the second tab; if you need only the tab matched, it will get a tad more complicated as you need to look into whether the rege
... See more
Never heard of Texpad before and didn't find information on the regex flavour it uses, but you could try something like this:

^[^\t]*\t[^\t]*\t

This is predicated on the regex engine representing tabs as \t and allowing for excluding character ranges, e.g. [^\t] meaning any character except tab.

Also, it matches the entire row up to the second tab; if you need only the tab matched, it will get a tad more complicated as you need to look into whether the regex engine supports lookbehind (= checking the environment to the left of a potential match, in this case the tab).
Collapse


 
Olaf Schutze (X)
Olaf Schutze (X)  Identity Verified
Wietnam
angielski > niemiecki
+ ...
try Feb 18, 2019

Angel Llacuna wrote:


How can I specify a regular expression on Texpad that searches for the second occurrence of a tab character on each row of a plain text file ?


^[^\t]*(\t{1}).*$ // the first
^[^\t]*(\t{2}).*$ //the second


 


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

Moderatorzy tego forum
Laureana Pavon[Call to this topic]

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

use of regular expressions on Textpad






Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »