Alternative for \\u in regex replacement string
Gijos autorius: Hans Lenting
Hans Lenting
Hans Lenting
Nyderlandai
Narys (2006)
iš vokiečių į olandų
Jan 8

Java (and CafeTran Espresso) doesn't support \u in replacement strings:

\u Changes the case of the next character to the upper case. Use this type of regex in the replace field.


After some thought, I came up with this solution:
First, insert a unique character like "‡" in front of every letter that needs to become uppercase (e.g., in front of every second word in each segment; use a regular expression to do this).
Second, create a text file with replacement rules for each letter of the alphabet.
Third, use this replacement list to run QA > Word lists > Replace in target segments.
1

2

3

4

5



[Edited at 2025-01-08 20:55 GMT]


 
Hans Lenting
Hans Lenting
Nyderlandai
Narys (2006)
iš vokiečių į olandų
TEMOS KŪRĖJA(S)
Demo & lists Jan 8

Image-000192

Or: https://share.cleanshot.com/ZYZk8xqR

Image-000187

For \u use:
‡a=A
‡b=B
‡c=C
‡d=D
‡e=E
‡f=F
‡g=G
‡h=H
‡i=I
‡j=J
‡k=K
‡l=L
‡m=M
‡n=N
‡o=O
‡p=P
‡q=Q
‡r=R
‡s=S
‡t=T
‡u=U
‡v=V
‡w=W
‡x=X
‡y=Y
‡z=Z

For \l use:
‡A=a
‡B=b
‡C=c
‡D=d
‡E=e
‡F=f
‡G=g
‡H=h
‡I=i
‡J=j
‡K=k
‡L=l
‡M=m
‡N=n
‡O=o
‡P=p
‡Q=q
‡R=r
‡S=s
‡T=t
‡U=u
‡V=v
‡W=w
‡X=x
‡Y=y
‡Z=z


[Edited at 2025-01-08 21:59 GMT]


 
Hans Lenting
Hans Lenting
Nyderlandai
Narys (2006)
iš vokiečių į olandų
TEMOS KŪRĖJA(S)
Important note Jan 9

Please note that the settings in the Find and Replace dialogue box are relevant for the QA Word lists function!

 


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

Šio forumo moderatoriai
Natalie[Call to this topic]

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

Alternative for \\u in regex replacement string






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! »