Definition A regular expression is a type of object. It can either be constructed with the constructor “RegExp” or written … More
Tag: regex
Regex : How to remove spaces from the left of a string with Regex
Use : replace(/\s+$/,””); Example : var test = ” xxxxx – yyyyyyy”; var firstResult = test.split(“-“)[0].trim(); // ” xxxxx” var … More