Search the Community
Showing results for tags 'regular expression'.
Hello there! Please kindly note that I've been staring down this code for days now, and I can't seem to get why the regular expression test method doesn't work (and why Firebug says "it is not a function" when my code skips over everything that deals with the results of the test method). I am trying to create a utility function for form validation that passes in an id and a regular expression. Here is my calling code: regularExpressionMatchFunction("firstName", "/^[A-Za-z'\.]+\s*[A-Za-z'\.\s]*$/"); Here is the code with the erroneous component in bold: function regularExp
Hi, I have a form field that needs to be validated before any attempt is made to upload the contents to a database. Fear not, the test is performed again in PHP before the db update! I am using jQuery and the associated jQuery form validation module. Everything works fine but I have found that three slightly different regular expression tests can be used - my question is: are there any performance or other reasons why one particular approach is best? Here's the code together with an explanation of the regex: $.validator.addMethod( "details_OK", function (value, elemen
Hi, I was learning the code on creating a search engine, that accompanies this book from here: http://www.peachpit.com/articles/article.aspx?p=1802754&seqNum=4 and encountered an issue in the se_index.php file. Everything worked fine until I tryed cyrillic characters, the preg_match_all('/\b\w+\b/', $content, $output) function didn't allow them to get through: After researching the net I fount the solution adding the u caracter for unicode like this: preg_match_all('/\b\w+\b/u', $content, $output); and it worked on the localhost with LAMPP. Rece