Javascript Regular Expression To Allow Negative Double Value? March 19, 2024 Post a Comment Hi I have e regular expression which helps me to validate user input. It only allows positive numbers with 2 decimal places, this is my regex: ^[0-9]+\.[0-9][0-9]$ I want this toSolution 1: It would be as follows:^(\-)?[0-9]+\.[0-9][0-9]$ CopySee working demo Solution 2: Think this will work:Baca JugaShow And Hide Element On Mouse Over JqueryDatetime From Utc In Local Time FormatWhy Does Queryselector Only Select The First Element And How Can I Fix This?^(-?)[0-9]+\.[0-9][0-9]$ Copy Share You may like these postsReplacing Invalid Characters In The Filename With Dashes Using ApplescriptJs Regex: Replace Words Not In A Span TagRegex To Find If There Is Only One Block Of CodeRegex Code In Javascript For Restricting Input Field Post a Comment for "Javascript Regular Expression To Allow Negative Double Value?"
Post a Comment for "Javascript Regular Expression To Allow Negative Double Value?"