Skip to content

Commit f06f725

Browse files
committed
#16 - TypeScript
1 parent a410453 commit f06f725

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const text: string = 'lor0em 9ip6sum 2 dolor 334, asit am3ed'
2+
const getNumbersRegex: RegExp = /\d/g
3+
console.log(text.match(getNumbersRegex)?.join(''))
4+
5+
// extra
6+
7+
const emailRegex: RegExp = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
8+
const phoneRegex: RegExp = /^\+?[1-9]\d{1,14}$/
9+
const urlRegex: RegExp = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/

0 commit comments

Comments
 (0)