I have a piece of regex I've been using in Perl to parse a large text file containing every stored procedure in an Oracle database. It looks like this:
/create\s+(proc(edure)?|function)\s+\[*(dbo)?\]*\.*\[*(\w+)/i
I'm not too familiar with Perl though, so would ideally like to convert this to Java. I've tried running it through some converters, which produces:
"/create\\s+(proc(edure)?|function)\\s+\\[*(dbo)?\\]*\\.*\\[*(\\w+)/i"
However, this doesn't seem to match any correct input. Can anyone give me some pointers in converting this correctly to Java?
Sample Data:
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE AddNewTc
@TCN NVARCHAR(100),
@TCM NTEXT,
@TCOLE IMAGE = NULL,
@BYSPID INT = 0,
Only the "CREATE PROCEDURE" line should be matched.