nawk empty regular expression error

Hello, All.
please help me with this problem.
i need to use variable as regular expression.
some thing like this:

BEGIN {
RS="\n";
ORS="\n";
reg_exp = ".+Dec.+";
# i mean that regular expression is any symbol before "Dec" and any symbol after it. For example <Worksheet ss:Name="December">
}

$0 ~ reg_exp {
print $0
next
}
and i get: error empty regular expression.
if i try like this

$0 ~ /.+Dec.+/{
print $0
next
}
everything is all right.
thanks in advance

you can try

reg_exp = "Dec"

thank you for your reply.
it works.

but actually a get a reg_exp during running the script

like this

$0 ~ /.+<Worksheet ss:Name.+/{
reg_exp = substr($0,22,3)
# i can print reg_exp. the value of reg_exp is "Dec"
print $0
next
}
and then i use this reg_exp.
the string which hold "<Worksheet ss:Name" is before string which i compare with reg_exp

and i stell get error

Maybe this helps you:

> cat kk
<Worksheet ss:Name="December">
<Worksheet ss:Name="November">
> regex="Dec"
> awk ' /.+'"${regex}"'.+/ ' kk
<Worksheet ss:Name="December">
> regex="Nov"                  
> awk ' /.+'"${regex}"'.+/ ' kk
<Worksheet ss:Name="November">

since you have .+ both infront of the "<Worksheet ss:Name" and behind it, it is also equivalent to /<Worksheet ss:Name/, there is no need to use .+ . However, for completeness, you should show a sample of your data file, and describe how you want your output to be.

You don't need the BEGIN{} part as it is the default action taken by nawk.

nawk '{
   regexp=".+Dec.+"
   if ($0 ~ regexp)
      print $0
}' file

Hello, All.
i had problem with connection yesterday and could not unswer.
Thanks a lot.
i've already solved my problem.
my problem was:

i was trying to use reg_exp before i assign this variable.
my script was:
BEGIN {
RS="\n";
ORS="\n";
reg_exp="";
}
$0 ~ /.+<Worksheet ss:Name.+/{
reg_exp = substr($0,22,3)
print $0
next
}
$0 ~ reg_exp {
print $0
print "TEST"
next
}

and input file was about:

Record_1
Record_2
Record_3
.......
Record_n
<Worksheet ss:Name="December">
Record_n+2
.....

Bye