The motion of a viscous filament in a porous medium or Hele-Shaw cell: a physical realisation of the Cauchy-Riemann equations