i have a div with the classes like
<div class="orignal sub-4 top-2">
what i want to achieve is to replace the classes sub-4 and top-2 with sub-3 and top-1 but retain the class orignal. Also is this possible to check for the prefix of a class like sub-* or to check if certain prefixed class is applied on an element.
You could do
to check for the class thatstarts with sub- you could use the attribute contains selector