Can jQuery or JavaScript be used with a regex to select multiple elements with similar id?
I have the following paragraphs:
You can use "start with" and "ends with" selectors provided by jQuery, like below.
$("[id^='item'][id$='2']").html("D");
Official documentation: