I am trying to see the definition of my trigger but when check my result, I see extra line at end of my trigger ALTER TRIGGER "USER"."EMP" ENABLE .... Also, I dont want to see the "USER". How can I delete them from my DDL result using regex?
That is NOT an 'extra line'; that is part of the DDL that the metadata package produces. Just use SUBSTR and INSTR to find the last newline and strip it.
If you don't want the schema prefix then use a transform and have Oracle remove it when you extract the DDL.
See Example 20-5 Modifying an XML Document in the utilities doc for how to remap a schema or remove it.