Regular Expression Problems

1

I have the following beginning of function sql that I will use for a procedures / function recreation system in C #

Create Function dbo.JN_FN_DataAtual(@TESTE INT)

And I created the regular expression

(?si)\bCREATE\s*\bFUNCTION?\s*(?<owner>\w*.\b)(?<function>.*?\W)

But you have returned the following results:

1- dbo.

2- JN_FN_DataAtual (

It worked, but the ". nor the parentheses "(".

What can it be?

    
asked by anonymous 14.08.2015 / 04:16

1 answer

2

If the purpose is to extract the name of the bank and the name of the procedure, this would be simpler:

Create Function ([^.]+)\.([^\(]+)

A good site to test regular expressions is this: link

    
14.08.2015 / 04:56