in reply to Reguler Expression Problem

You have the query in XML - use XML! Ask for the text child of the query tag and you are finished.
BTW, [INSERT|CREATE] matches any of the characters ACEINRST|, not one of the words. See perlre.

Replies are listed 'Best First'.
Re^2: Reguler Expression Problem
by sarf13 (Beadle) on Jul 24, 2012 at 10:38 UTC
    hii thanx for such quick reply.but i can not pass this as xml because i have to put some validation check on retrieve sql query.
      I do not understand. Where is the problem? Get the query from XML, then do the validation.

      Using regex to manipulate XML is like using a belt sander to remove a zit from your face: it will do the job, but it will be a lot more painful than you can ever imagine.

      Please read and heed the wise counsel of choroba. Perhaps some monk better versed than I in XML can suggest a couple of specific XML modules that might be of use?

      really? Why are you so sure about that?

      K(eep)
      I(t)
      S(imple)
      S(illy)
      Get your data in, as it is, exactly as it appears from your file

      *Then* do whatever validation/processing you need to do on it... don't make the problem harder than it needs to be...