You can find useful information here .
for your case it may work
$("div:regex(class, .a*c)").jqFunction()
to match the start of the selector line
<script>$('input[name^="txt"]').val('content here!');</script>
this Finds all inputs with an attribute name that begins with 'txt' and places the text in them.
<script> $("div:contains('new')").css("text-decoration", "underline"); </script>
Finds all divs containing the "new" and underlines them.
<script>$('[name$="address"]').val('a letter');</script>
Finds all the inputs with the attribute name, which ends with the "address" and puts the text in them.
A combination of these features may be useful to you if it helps.
Devjosh
source share