Applescript for QXP 8.5.1 Find and Replace w/ Placeholder

This is what I got so far:


tell application "QuarkXPress"
	set counttb to every table box of document 1
	repeat with i from 1 to count counttb
		tell document 1
			set tbcolumn to count of table column of table box i
			set tcount to count of text cells of table box i
			repeat with c from 1 to tbcolumn
				-- set priceOffsets to AST find regex "[0-9]{1,3},[0-9]{2} €" in string theStory with returning offsets
				-- if priceOffsets is not missing value then
				-- reverse the list, edit from end to front so the offsets stays correct
				-- set priceOffsets to reverse of priceOffsets
				-- repeat with priceRange in priceOffsets
				-- set foundString to getRangeOfStory(storyIndex, rm_so of priceRange, rm_eo of priceRange)
				-- setRangeOfStory(storyIndex, rm_so of priceRange, rm_eo of priceRange, "000,00 €")
				-- end repeat
				-- end if
			end repeat
			display dialog tbcolumn
			-- display dialog tcount
		end tell
	end repeat
end tell

I can loop through all tables and know how much columns are there. What I try to achieve is to move to the column which contains “Preis” as column header and change there the price with the regex [0-9]{1,3},[0-9]{2} € to 000,00 €.

If I can get this, than I have to think about to implement it to the previous script!

I am stuck to get the right column and replace the price :frowning:

Any help is really appreciated.

Thanks is advance :smiley: