Separating results that begin with the first letter from rest matching results

Separating results that begin with the first letter from rest matching results

Hello,

I am using autocomplete to help users find categories based on their input and I have used the following expression, to filter out results that do not begin with the first letter typed by the user.

var matcher = new RegExp("^" + $.ui.autocomplete.escapeRegex( request.term ), "i" );

my question is: can I have a second matcher without the "^" + option and display the results beneath like so

user types: sc

end gets:

Scala
Scheme

----- Related Results ---

ActionScript
AppleScript
JavaScript