Skip to main content
Question

Replace two round brackets (( by three round brackets ((( and same for closing brackets

  • September 10, 2026
  • 0 replies
  • 3 views

tanjabwzc
Participant
Forum|alt.badge.img+4

Have a WKT csv, with lines like these two: 

MULTIPOLYGON (((3.751446328848148 51.09789238333794,3.7514744771186774 51.09785395106413,3.7515454118479563 51.09787454834335)),((3.7486227439488014 51.10188366613414,3.7471867226749627 51.101468672794745,3.745208081250554 51.1041693453312)));2003001

POLYGON ((3.743757864908372 51.08620899834685,3.744266505912946 51.0833952986076,3.7433015994552856 51.08332946064444));2003002

However, the receiving software can only handle multipolygons. So in the second line, I need to replace “POLYGON” bij “MULTIPOLYGON” (which is easy), but also the two opening round brackets “((“ need to be replaced by three opening round brackets “(((“ and the same for the closing brackets.

I don’t seem to find a way of escaping the brackets. Even in regex expressions FME interprets the brackets as real brackets and not characters to look for.

Can anyone help here?