kelvint     2004/01/12 23:01:33

  Modified:    contributions/javascript/queryValidator
                        luceneQueryValidator.js
  Log:
  Fixed case where wildcard character at start of string.
  
  Revision  Changes    Path
  1.6       +2 -2      
jakarta-lucene-sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js
  
  Index: luceneQueryValidator.js
  ===================================================================
  RCS file: 
/home/cvs/jakarta-lucene-sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- luceneQueryValidator.js   10 Jan 2004 13:28:33 -0000      1.5
  +++ luceneQueryValidator.js   13 Jan 2004 07:01:32 -0000      1.6
  @@ -40,7 +40,7 @@
       }
       
       // check wildcards are used properly
  -    matches = query.match(/^[\*]*$|([\s]\*)/);
  +    matches = query.match(/^[\*]*$|[\s]\*|^\*[^\s]/);
       if(matches != null && matches.length > 0)
       {
         if(alertUser) alert("Invalid search query! The wildcard (*) character must be 
preceded by at least one alphabet or number. Please try again.")
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to