I have the following input elements:
You can look for id's starting with AAA and ending with BBB like this:
AAA
BBB
$("[id^=AAA_][id$=_BBB]")
The working fiddle: http://jsfiddle.net/DN9uV/