I need this function to return true if the string contains number, .dot or % sign.
Here are the. examples of values i need it to return true.
- 100
- 100.00
- 10%
isNumeric(value: any) {
return /^-?\d+$/.test(value);
}
>Solution :
\d|\.|% would do?
You can test the regex on sites such as regex101