Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # select regexp_replace(x, E'.*eventType=(\\S+).*', E'\\1'), regexp_replace(x, E'.*emailAddress=(\\S+).*', E'\\1') from ( values ('[2010-10-19 20:04:15,099] INFO [task-scheduler-2] com.ebates.acxiomInstantEventProcessor.CustomMessageHandler Message is [Payload=Event creation date is Tue Oct 19 20:04:15 PDT 2010 delivery attempts 0 payload is {userId=40037081, gift=0, merch=Buy.com, emailAddress=veracellular@optonline.net, autoLoginId=3HheFfypoxurQrfxc4UFBQ%3D%3D, merchantSession=245481087, date=10/19/10, eventType=shopperNotification, merchantId=1440}][Headers={springintegration_jms_redelivered=false, springintegration_id=22732875-dedb-4fde-ae05-ce92890952a9, springintegration_timestamp=1287543855099, springintegration_jms_messageId=ID:prod-batch1-50134-1286490720558-0:0:1:1:39125}]') ) as q(x);
- regexp_replace | regexp_replace
- ----------------------+-----------------------------
- shopperNotification, | veracellular@optonline.net,
- (1 row)
- Can I somehow get rid of the comma in the end. Also is it possible to get the time stamp 2010-10-19 20:04:15
- using the magic of regular expressions. such that the results lok like
- thetime | regexp_replace | regexp_replace --------------------------------------------------+---------------------------
- 2010-10-19 20:04:15 | shopperNotification | veracellular@optonline.net
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement