If you string returns like you show you could check for the commas also: ,7, which would not give any other numbers, like 17, 27, etc.
No, actually you cant. You cant ever assume its going to be written that way since there are 4 ways to do it.
7 will get false positive with 17
,7 will get false positive with ,71
7, will get false positive with 17,
,7, will never get false positive but there is only 25% chance it will have this format instead of other 3.