mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-24 21:20:12 +00:00
Fix regeex for ip
This commit is contained in:
parent
d1015ed59c
commit
c9d2016a07
@ -126,10 +126,8 @@ int isValidIPaddress(const char * ip){
|
||||
|
||||
/* Compile regular expression */
|
||||
reti = regcomp(®ex,
|
||||
"^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))."
|
||||
"([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))."
|
||||
"([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))."
|
||||
"([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$", REG_EXTENDED);
|
||||
"^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$",
|
||||
REG_EXTENDED);
|
||||
if (reti) {
|
||||
//printf( "Could not compile regex\n");
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user