+ 13

[Regex] tips

here a code about regex ! if you wanted to learn it, or to be stronger, it's here 😀 https://code.sololearn.com/W0pNLQ8bef6J/?ref=app

24th Oct 2017, 12:16 AM
NoxFly
NoxFly - avatar
9 Answers
+ 5
Good one, you helps lot for regex tips/reference
25th Oct 2017, 8:21 AM
Ankit
Ankit - avatar
+ 5
thanks :)
25th Oct 2017, 8:34 AM
NoxFly
NoxFly - avatar
+ 4
Quite helpful. Also one of my weakest areas in Python!
24th Oct 2017, 1:49 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 4
you're welcome 😁
24th Oct 2017, 6:27 PM
NoxFly
NoxFly - avatar
+ 4
you're welcome !
17th Jun 2018, 12:42 PM
NoxFly
NoxFly - avatar
+ 4
oninput is when you do something related to the input. onkeyup is when you pressed a key on your keyboard. So onkeydown is when you stopped pressing the key.
17th Jun 2018, 12:48 PM
NoxFly
NoxFly - avatar
+ 3
This is actually amazing, thank you!
24th Oct 2017, 6:19 PM
Mert Açıkportalı
Mert Açıkportalı - avatar
+ 3
Pepe the Hacker see my code 9 challenges, I did it : https://code.sololearn.com/W6mVdUoF5wF4/?ref=app here is what I did and what you want : <input type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, ''); this.value = this.value.replace(/(\..*)\./g, '$1');" id="entry" placeholder="Enter a number" maxlength="15"/> this is for allow only numbers. so change the regex by yours !
17th Jun 2018, 11:18 AM
NoxFly
NoxFly - avatar
+ 3
the () ? it's included on my lesson ^^ it's to group what you want, and you can recall it with $1 (with " ") for example string.replace(/hi (nox)/, "hello $1"); here $1 = nox and you can have multiple $ thanks multiple ()
17th Jun 2018, 12:25 PM
NoxFly
NoxFly - avatar