extracting id from selection text