$str = "This string has a number +15 init "; regex : m/.*([\+|-](\d+)).*$/ #which works well for above said string