I have the string id=0515 abcdefghijk. With the goal of matching only the 0515, I created the following regex: ((?<=id=).*(?<=\s)).
My result was 0515 (with the space between the id and letters included). 
If I change my regex to the following (replace the '\s' with an actual space), I get my intended result of just the numbers with no space at the end:  ((?<=id=).*(?= ))
Is it okay to use an actual space instead of the character code? Or does my regex need more work?
 
    