However, since you anchor the search with the ^ at the start and the $ at the end, and you're only looking for the name, it can't match.
You could match with /^\Q$student\E\s+\d+$/ - Student name, one or more blanks, one or more digits.
In reply to Re: regex issue
by matija
in thread regex issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |