What would be the correct regex to check wether a checkbox is checked in javascript?
update: i know it is usually not done with a regex. But since its part of a form module and all the validations are done with a regex. I thought this could also be checked with a regex. My quyestion is how.
You really just want to access the
checkedproperty. (Truly, regex has no place here – it should be used only with lack of anything better.)Try this: