Skip to content

Instantly share code, notes, and snippets.

@joefromct
Created October 28, 2016 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joefromct/e40ddcce88a292db401e68e6bcfd762b to your computer and use it in GitHub Desktop.
Save joefromct/e40ddcce88a292db401e68e6bcfd762b to your computer and use it in GitHub Desktop.
with
t as (select 'Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium'::text as t ),
select
t,
reverse(
regexp_replace((reverse(t::text)), E'(.{0,63} )(.*)' ,' \1 ') )
as test
from t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment