use substr instead of preg_match to check for '_id'

For slighter faster performance gain

Change-Id: Iba8928f5a06eb5f83e601c41cb3467923575ae08