From eb9bc807dae70459fc0e906c4421e2beb959852a Mon Sep 17 00:00:00 2001 From: Kelvin Tan Date: Tue, 13 Jan 2004 07:01:32 +0000 Subject: [PATCH] Fixed case where wildcard character at start of string. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150923 13f79535-47bb-0310-9956-ffa450edef68 --- .../javascript/queryValidator/luceneQueryValidator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js b/sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js index 011dcf71935..843be1e4ea7 100644 --- a/sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js +++ b/sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js @@ -40,7 +40,7 @@ function doCheckLuceneQuery(queryField) } // 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.")