Hyphen indicates as character range (as in "a-z"), so if you want to include a hyphen as a character, escape it with a single backslash.

-- Jack Krupansky

-----Original Message----- From: meghana
Sent: Wednesday, April 17, 2013 7:58 AM
To: solr-user@lucene.apache.org
Subject: Pattern Tokenizer Factory not working with negation regular expression

Hi,

I need my tokenizer factory , to split on everything expect numbers ,
letters , '&' , ':' and single quote character.

I use 'PatternTokenizerFactory' as below,

<tokenizer class="solr.PatternTokenizerFactory"
pattern="[^a-zA-Z0-9&amp;-:]" />

but, its spiting tokens by space only . not sure what I am doing wrong in
this.

can anybody help me on this??
Thanks




--
View this message in context: http://lucene.472066.n3.nabble.com/Pattern-Tokenizer-Factory-not-working-with-negation-regular-expression-tp4056653.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to