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.
I know it doesn't effect the running query, but I am trying to compare my two trigger using C# and this lime makes everything massed up . Need to remove this line ALTER TRIGGER "USER"."EMP" ENABLE and also needs to make "USER"."EMP" only "EMP"
You've been at this very strange "comparing the objects of two schemas" project for months now.
What's the point of it? It's sounds like you're going about in the most difficult way possible.
If you want to make schema a look like schema b, why not just drop schema a and copy/import b into a.