Javascript regular expressions?

Hi all!
there is a variable which takes the string "Apple Cinema 30" 80 x 200 cm (+3000 ₽)"
it is necessary that this line is not displayed price that is this "(+3000 ₽)"
code
$('.myniceselect').change(function() {
 var textselect = $('.current').text();
 if (textselect != '--- Select --- ') {
$('#size-title').text(textselect);
 } else {
$('#size-title').text(");
}
 });

thank you in advance for your help
March 25th 20 at 12:40
1 answer
March 25th 20 at 12:42
Solution
str.replace(/ \(\+\d+ ₽\)/, ");
Variable and where to insert? - theresia.Toy commented on March 25th 20 at 12:45
@theresia.Toy,
$('#size-title').text(textselect.replace(/ \(\+\d+ ₽\)/, "));
- pearlie_Braun79 commented on March 25th 20 at 12:48
@pearlie_Braun79, thank you - theresia.Toy commented on March 25th 20 at 12:51

Find more questions by tags jQueryJavaScript