Monday 20 June 2022

regex to allow negative numbers
-?\d+(?:\.\d{1,2})?$

Thursday 21 April 2022

^(?:\d{10}|\d{3}([- ])\d{3}\1\d{4}|\(\d{3}\)(?:(-)|[ ])\d{3}(?:\2|-)\d{4})$

https://regex101.com/r/hjPF6N/4


news
^(?:\d{10}|(\()?\d{3}(?(1)\))(?:([- ])| )\d{3}(?:\2|-)\d{4})$

https://regex101.com/r/hjPF6N/2

Tuesday 5 April 2022

^[a-zA-Z -&]+$

allow character, space, ampersand and hyphen