Regex expression to find superscript characters only?
Thread poster: JaneD

JaneD  Identity Verified
Sweden
Local time: 21:12
Member (2009)
Swedish to English
+ ...
Jan 14, 2014

Hi all,

I'm currently working on a very fiddly translation that contains many instances of the French "e" for the English ordinal "th" (e.g. "Ve s." becomes "5th century").

Unfortunately the "e" is superscripted in the middle of a large number of tags and I can't do a standard find and replace because Trados thinks that it's not a whole word.

Does anyone know the regex code to pick out only superscript sections of a text so that I can replace "e" with "th" without having to do it all by hand?

On the same subject, does anyone know of a good resource with a comprehensive list of regex codes? I often need to use them but find it's so difficult to find out what to enter that I end up not bothering.

Thanks in advance!

Jane


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 21:12
English
Tricky... Jan 14, 2014

... because it might be the tags that set the superscript property. Or is it just that you have a particularly taggy file (pdf maybe)?

If you can share a small sample so I can see what you mean I’ll have a go? In the meantime this site is pretty useful:

http://www.regular-expressions.info/reference.html

Regards

Paul
pfilkin@sdl.com


Direct link Reply with quote
 
Bernard Lieber  Identity Verified
Local time: 21:12
English to French
+ ...
Workaround Jan 15, 2014

As Paul pointed out, it could be tricky - a few examples would be welcome. If your text is just Ve s., I would use TermInjector (OpenExchange) with the following replacement rules:

V -> 5
([eE]) -> th
s. -> century

You'll get this: Ve s. 5th century

HTH,

Bernard

[Edited at 2014-01-15 12:25 GMT]


Direct link Reply with quote
 


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


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

Regex expression to find superscript characters only?

Advanced search







BaccS – Business Accounting Software
Modern desktop project management for freelance translators

BaccS makes it easy for translators to manage their projects, schedule tasks, create invoices, and view highly customizable reports. User-friendly, ProZ.com integration, community-driven development – a few reasons BaccS is trusted by translators!

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 »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search