11 Nov
2016
11 Nov
'16
7:42 a.m.
Hi, the examples on „“ are working successfully. But I need the function like ${var:0:-7}. For example: My dialplan app return a value like this “from number”|”location” ->123456|intern. The length of the “from number” is unknown, but the length of the location is fix (it could be intern or extern only). Now I am trying ${var:0:-7} to extract the “123456”, but I get the complete string 123456|intern. What can I do with this function? Or is the only possibility to solve this via a regular expression ^([0-9]+)[|](intern|extern)$ -> (not tested ;-)? Thanks a lot!