I am trying to make a cash register using javascript and on every new line i add via a function the $ sign using the string.test(regex is ^\$.+). When the user enters a few digits and presses enter, the function adds in a br / element in the html. but in html there is only the br / and no newline \n or \r. Is it possible to check for every break the regex test again. The regex has the global flag. Many thanks
Comments
Post a Comment