linux shell search for number that does not ocur between numbers <p>I want to search for a number in string that does not occur between numbers.</p> <p>For example: string="10003096,10007051,10003098,10007053,10000952,10002696,10003619,900004608"</p> <p>If i search for 10003096, then it exists. But if i search for 1000, then it means it does not exist. Even if i search for 10000952,10002696, then it means it does not exist.</p> <p>How can i write the shell script for this?</p> <p>Please help.</p> <p>I have tried various options with grep and sed but it does not help.</p>