Get string between two other strings in javascript

Supossed you want to extract all strings that are between two other strings in javascript. One way of achiving this is regex.

For example:

will alert : ’28’