string literals are null-terminated, so `integer' see "(\+|-"
may use the constructor that specifies the length of the string http://www.cplusplus.com/reference/string/string/string/ (5)
edit: or change the regex to "([+-]?)"
apart from that, would recommend to use raw strings to avoid backslash hell "\\+"