I modified your code to have optional space-or-not between the number and the 11. Because your search string is simple, it can be done without regex, by finding the position of ^11 then adding 3. The text after the number can be stripped by using the undocumented behavior of several functions, including //echo -a $abs(123abc) returns 123

Code:
//var %text test $chr(3) $+ 11 987abc | var %variable $chr(3) $+ 11 $+ $chr(32) $+  ?[0-9]{2,} | echo -a $regex(%text,%variable) / $abs($mid(%text,$calc(3+$pos(%text,$chr(3) $+ 11,1))))