Thursday, March 10, 2016

python - Regex working wrong, matching unexpected things

I have this regex:



[\(\+\[]?[0-9]([\-\)\.\/-\]]?\s?\(?[0-9\s\)]){8,20}?



It must match only phone numbers, but instead it also matches things like:



[95.86.22.137]
95.86.22.137
(192.168.1.94)
274.1363525390625px;">
2014-8-720:32:45


Can someone help me correct this regex please ?

No comments:

Post a Comment