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

JaneD  Identity Verified
Sweden
Local time: 15:59
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: 15:59
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: 15:59
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







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 »
SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »



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