on unix you may use od -cb to get the octal printout and escaped form of the character that you are dealing with after that it may be easier to get an idea of what is going on. the comamnd would be:
Also you do not seem to chomp on your original post, is the number that you are trying to match at the end of the | seperated line? could the issue be an \n appended to the number?