I'm trying to add a character to the beginning of certain strings with Regular Expressions but am very new to it and can't seem to find an answer for what I'm looking for. I have strings like Below 1499 and Above 1900 and I want to add a $ to the beginning of the number strings. Here's what I've got to locate the code (btw, these are all text characters in a div with a class of refinement_price_text):
$('.refinement_price_text').each(function(){
console.log($(this).text().match(/\d{1,5}/g));
});
It logs them out to the console fine. They are logged as arrays with one item. I don't know how to prepend a dollar sign to them now though. I've tried prepend() and that doesn't work. I've tried to set the match() as a variable but that didn't work. I wanted to originally use replace() but I need to maintain the current values there and just add the dollar sign character to the beginning and I didn't know what the equivalent of $(this) is for a regular expression in order to keep the same values.
Let me know if this is making sense. I'm sure there must be a function that will easily do this? Thanks for your help!