Find and Replace Question

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dursunarif05
Posts: 3
Joined: 15 Jun 2021, 14:09

Find and Replace Question

16 Jun 2021, 15:40

Hi AHK community,

I have a translation project and I use Trados studio. There are lots of segments having the same linguistic syntax. But I often need to make changes in it.

I need to match the first occurence of the word "içinde" after the word "olarak,?" ( (?!(.+olarak,?))((\s[\d\w()/]+){3}\siçinde) )
and then get the matched content to the clipboard 1
then search and match for the word olarak,?
get the matched contend to the clipboard as 2
and paste clipboard 1 + clipboard 2 to reach the goal such that the final result would be => ... olarak, dioksan (5 mL) içinde ...
(or move the cursor after the word "olarak,?" then paste clipboard 1)
clear the clipboard

image.png
image.png (52.16 KiB) Viewed 165 times

Original sentence:
(S)-etil 2-(2-((4-(2-((1,1-dimetiletilsülfinamido)metil)-3-floropiridin-4-il)-1-(metilsülfonil)-1H-indol-6-il)metoksi)fenil)asetat (12a)'nin hazırlanması Bileşik 12a şema 1'in adım 3'ünde bildirilen usule uygun olarak, etil 2-(2-((1-(metilsülfonil)-4-(4,4,5,5-tetrametil-1,3,2-dioksaborolan-2-il)-1H-indol-6-il)metoksi)fenil)asetat'tan (211a) (0,6 g, 1,17 mmol) dioksan (5 mL) içinde kullanılarak (S)-N-((4-kloro-3-floropiridin-2-il)metil)-2-metilpropan-2-sülfinamit (220c) (0,46 g, 1,75 mmol), bis(trifenilfosfin)paladyum(II) klorür (0,12 g, 0,18 mmol) ve bir K2CO3 çözeltisi (0,40 g, 2,92 mmol) su (0,5 mL) içinde bir Ar atmosferi altında ve 90 °C'de 4 saat süreyle yağ banyosunda ısıtılarak.

Final sentence:
(S)-etil 2-(2-((4-(2-((1,1-dimetiletilsülfinamido)metil)-3-floropiridin-4-il)-1-(metilsülfonil)-1H-indol-6-il)metoksi)fenil)asetat (12a)'nin hazırlanması Bileşik 12a şema 1'in adım 3'ünde bildirilen usule uygun olarak, dioksan (5 mL) içinde etil 2-(2-((1-(metilsülfonil)-4-(4,4,5,5-tetrametil-1,3,2-dioksaborolan-2-il)-1H-indol-6-il)metoksi)fenil)asetat'tan (211a) (0,6 g, 1,17 mmol) kullanılarak (S)-N-((4-kloro-3-floropiridin-2-il)metil)-2-metilpropan-2-sülfinamit (220c) (0,46 g, 1,75 mmol), bis(trifenilfosfin)paladyum(II) klorür (0,12 g, 0,18 mmol) ve bir K2CO3 çözeltisi (0,40 g, 2,92 mmol) su (0,5 mL) içinde bir Ar atmosferi altında ve 90 °C'de 4 saat süreyle yağ banyosunda ısıtılarak.

I don't try to do this by Trados Find%Replace, because it kills tag (formatting xml data) data. I'd like to do this by AHK just like I do it manually with mouse and keyboard operation.

I'd appreciate if you could provide me with the code.

Thanks
dursunarif05
Posts: 3
Joined: 15 Jun 2021, 14:09

Re: Find and Replace Question

17 Jun 2021, 01:25

Here is a 8-second video to clear things up:
https://streamable.com/kky76q

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Joey5 and 226 guests