daGrevis Posted May 5, 2010 Report Share Posted May 5, 2010 Sveiki, Problēma ar regEx'iem. Atradu, tā teikt totāls supers, resursu, kura ir labi piemēri regEx'iem, bet problēma: PHP met sekojošu brīdinājumu. Kā novērst?? =) Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in ***\functions.php on line *** Kods: function is_IP($IP) { return(!preg_match('\b(?:\d{1,3}\.){3}\d{1,3}\b', $IP)) ? false : true; } Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 5, 2010 Author Report Share Posted May 5, 2010 Oi, pats resurss: http://www.regular-expressions.info/examples.html ! =) Quote Link to comment Share on other sites More sharing options...
bobsters Posted May 5, 2010 Report Share Posted May 5, 2010 function is_IP($IP) { return(!preg_match('/\b(?:\d{1,3}\.){3}\d{1,3}\b/', $IP)) ? false : true; } Quote Link to comment Share on other sites More sharing options...
daGrevis Posted May 5, 2010 Author Report Share Posted May 5, 2010 Paldies! =) Sanāk jāliek starp '//'?? =) Quote Link to comment Share on other sites More sharing options...
bobsters Posted May 5, 2010 Report Share Posted May 5, 2010 (edited) Preg_match() paskaties pats :) Edited May 5, 2010 by bobsters Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.