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

JaneD  Identity Verified
Sweden
Local time: 00:14
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


 

SDL Community  Identity Verified
United Kingdom
Local time: 00:14
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


 

Bernard Lieber  Identity Verified
Local time: 00:14
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]


 


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







PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use SDL Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

More info »



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