Would it be possible to select using a regular expression in jQuery? Something like
$('input[name=^[a-z]+_[1-9].*]')
Would it be possible to select using a regular expression in jQuery? Something like
$('input[name=^[a-z]+_[1-9].*]')
You can find a regex selector here (by James Padolsey), called like this in your case:
$('input:regex(name,^[a-z]+_[1-9].*)');
There's nothing built in, but you could use the filter() method to achieve the same goal:
$('input').filter(function () { return /^[a-z]+_[1-9].*/.test(this.name); })