there was recently a commit related to re.subst. looks like it broke one of my re.substs that used to work before:
$(rb{re.subst,/[\n\r\t]//g})
Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [re.c:235]: ERROR: subst_parser: expression is too short: /[ Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: textops [txt_var.c:230]: invalid transformation [subst,/[#012#015#011]//g}] <8> Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:1303]: error parsing [{re.subst,/[#012#015#011]//g}] Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:698]: bad tr in pvar name "rb" Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:724]: invalid parsing in [$(rb{re.subst,/[#012#015#011]//g})>#012] at (4)
my testing is pretty much stuck before this is fixed.
-- juha
On Thursday 18 August 2011, Juha Heinanen wrote:
there was recently a commit related to re.subst. looks like it broke one of my re.substs that used to work before:
$(rb{re.subst,/[\n\r\t]//g})
Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [re.c:235]: ERROR: subst_parser: expression is too short: /[ Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: textops [txt_var.c:230]: invalid transformation [subst,/[#012#015#011]//g}] <8> Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:1303]: error parsing [{re.subst,/[#012#015#011]//g}] Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:698]: bad tr in pvar name "rb" Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:724]: invalid parsing in [$(rb{re.subst,/[#012#015#011]//g})>#012] at (4)
I'll have a look at that one.
On Thursday 18 August 2011, Juha Heinanen wrote:
there was recently a commit related to re.subst. looks like it broke one of my re.substs that used to work before:
$(rb{re.subst,/[\n\r\t]//g})
Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [re.c:235]: ERROR: subst_parser: expression is too short: /[ Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: textops [txt_var.c:230]: invalid transformation [subst,/[#012#015#011]//g}] <8> Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:1303]: error parsing [{re.subst,/[#012#015#011]//g}] Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:698]: bad tr in pvar name "rb" Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:724]: invalid parsing in [$(rb{re.subst,/[#012#015#011]//g})>#012] at (4)
my testing is pretty much stuck before this is fixed.
I'll try to fix this later today. As a temporary workaround you can use:
$var(re) = "/[\n\r\t]//g"; xlog("RB2: $(rb{re.subst,$var(re)})");
Question for the script parser experts: are special characters in strings supposed to be expanded before they are given to the underlying C functions?
On 8/18/11 3:45 PM, Alex Hermann wrote:
On Thursday 18 August 2011, Juha Heinanen wrote:
there was recently a commit related to re.subst. looks like it broke one of my re.substs that used to work before:
$(rb{re.subst,/[\n\r\t]//g})
Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR:<core> [re.c:235]: ERROR: subst_parser: expression is too short: /[ Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: textops [txt_var.c:230]: invalid transformation [subst,/[#012#015#011]//g}]<8> Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR:<core> [pvapi.c:1303]: error parsing [{re.subst,/[#012#015#011]//g}] Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR:<core> [pvapi.c:698]: bad tr in pvar name "rb" Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR:<core> [pvapi.c:724]: invalid parsing in [$(rb{re.subst,/[#012#015#011]//g})>#012] at (4)
my testing is pretty much stuck before this is fixed.
I'll try to fix this later today. As a temporary workaround you can use:
$var(re) = "/[\n\r\t]//g"; xlog("RB2: $(rb{re.subst,$var(re)})");
Question for the script parser experts: are special characters in strings supposed to be expanded before they are given to the underlying C functions?
Depends on what the underlying C function expects. The parser is converting escaped characters to their byte code.
Cheers, Daniel
On Thursday 18 August 2011, Alex Hermann wrote:
On Thursday 18 August 2011, Juha Heinanen wrote:
there was recently a commit related to re.subst. looks like it broke one of my re.substs that used to work before:
$(rb{re.subst,/[\n\r\t]//g})
Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [re.c:235]: ERROR: subst_parser: expression is too short: /[ Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: textops [txt_var.c:230]: invalid transformation [subst,/[#012#015#011]//g}] <8> Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:1303]: error parsing [{re.subst,/[#012#015#011]//g}] Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:698]: bad tr in pvar name "rb" Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:724]: invalid parsing in [$(rb{re.subst,/[#012#015#011]//g})>#012] at (4)
my testing is pretty much stuck before this is fixed.
I'll try to fix this later today. As a temporary workaround you can use:
$var(re) = "/[\n\r\t]//g"; xlog("RB2: $(rb{re.subst,$var(re)})");
Question for the script parser experts: are special characters in strings supposed to be expanded before they are given to the underlying C functions?
What i meant is:
Can i differentiate between an escaped linebreak and a 'physical' linebreak?:
$(rb{re.subst,/\n//g})
and
$(rb{re.subst,/ //g})
If so, how?
On Thursday 18 August 2011, Juha Heinanen wrote:
there was recently a commit related to re.subst. looks like it broke one of my re.substs that used to work before:
$(rb{re.subst,/[\n\r\t]//g})
Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [re.c:235]: ERROR: subst_parser: expression is too short: /[ Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: textops [txt_var.c:230]: invalid transformation [subst,/[#012#015#011]//g}] <8> Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:1303]: error parsing [{re.subst,/[#012#015#011]//g}] Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:698]: bad tr in pvar name "rb" Aug 18 15:43:54 sip /usr/sbin/sip-proxy[14727]: ERROR: <core> [pvapi.c:724]: invalid parsing in [$(rb{re.subst,/[#012#015#011]//g})>#012] at (4)
This is fixed in c64bc01063c7f221445c2d60af9714ec12e649f7.