J
Jonathan Sion
Hi,
I'm totally new to this forum, and relatively new to regexp. What I am
looking for is an expression that in a pieace of TSQL code, will move
the function header, and then all whitespaces in it. I came up with
this one:
\s||(^(.|\n)*((create\s*view)|(create\s*proc)|(create\s*function)|
(create\s*trigger)))
So, its basically, 'all whitespaces, or anything that's at the
beginning of the header (create [entity type]... that's TSQL)
I think this works ok, though I haven't tested much. (Does it make
sense?) now my question is, when I change the order:
(^(.|\n)*((create\s*view)|(create\s*proc)|(create\s*function)|(create
\s*trigger)))||\s
The \s doesn't work! It doesn't clear out whitespaces. Now why is
that? If its this-or-that, why does the order matters? I have a
feeling that fundamentally I misunderstood something....
Thanks!
I'm totally new to this forum, and relatively new to regexp. What I am
looking for is an expression that in a pieace of TSQL code, will move
the function header, and then all whitespaces in it. I came up with
this one:
\s||(^(.|\n)*((create\s*view)|(create\s*proc)|(create\s*function)|
(create\s*trigger)))
So, its basically, 'all whitespaces, or anything that's at the
beginning of the header (create [entity type]... that's TSQL)
I think this works ok, though I haven't tested much. (Does it make
sense?) now my question is, when I change the order:
(^(.|\n)*((create\s*view)|(create\s*proc)|(create\s*function)|(create
\s*trigger)))||\s
The \s doesn't work! It doesn't clear out whitespaces. Now why is
that? If its this-or-that, why does the order matters? I have a
feeling that fundamentally I misunderstood something....
Thanks!