Class PatternReplaceFilter
  
  A TokenFilter which applies a System.Text.RegularExpressions.Regex to each token in the stream,
replacing match occurances with the specified replacement string.
Note: Depending on the input and the pattern used and the input
Lucene.Net.Analysis.TokenStream, this Lucene.Net.Analysis.TokenFilter may produce Lucene.Net.Analysis.Tokens whose text is the empty
string.
    Inheritance
    System.Object
    Lucene.Net.Util.AttributeSource
    Lucene.Net.Analysis.TokenStream
    Lucene.Net.Analysis.TokenFilter
    PatternReplaceFilter
   
  
    Implements
    System.IDisposable
   
  
    Inherited Members
    
      Lucene.Net.Analysis.TokenFilter.m_input
    
    
      Lucene.Net.Analysis.TokenFilter.End()
    
    
    
      Lucene.Net.Analysis.TokenFilter.Reset()
    
    
      Lucene.Net.Analysis.TokenStream.Dispose()
    
    
      Lucene.Net.Util.AttributeSource.GetAttributeFactory()
    
    
      Lucene.Net.Util.AttributeSource.GetAttributeClassesEnumerator()
    
    
      Lucene.Net.Util.AttributeSource.GetAttributeImplsEnumerator()
    
    
      Lucene.Net.Util.AttributeSource.AddAttributeImpl(Lucene.Net.Util.Attribute)
    
    
      Lucene.Net.Util.AttributeSource.AddAttribute<T>()
    
    
      Lucene.Net.Util.AttributeSource.HasAttributes
    
    
      Lucene.Net.Util.AttributeSource.HasAttribute<T>()
    
    
      Lucene.Net.Util.AttributeSource.GetAttribute<T>()
    
    
      Lucene.Net.Util.AttributeSource.ClearAttributes()
    
    
      Lucene.Net.Util.AttributeSource.CaptureState()
    
    
      Lucene.Net.Util.AttributeSource.RestoreState(Lucene.Net.Util.AttributeSource.State)
    
    
      Lucene.Net.Util.AttributeSource.GetHashCode()
    
    
    
    
      Lucene.Net.Util.AttributeSource.ReflectWith(Lucene.Net.Util.IAttributeReflector)
    
    
      Lucene.Net.Util.AttributeSource.CloneAttributes()
    
    
      Lucene.Net.Util.AttributeSource.CopyTo(Lucene.Net.Util.AttributeSource)
    
    
      Lucene.Net.Util.AttributeSource.ToString()
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
   
  
  Assembly: Lucene.Net.Analysis.Common.dll
  Syntax
  
    public sealed class PatternReplaceFilter : TokenFilter, IDisposable
   
  Constructors
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  PatternReplaceFilter(TokenStream, Regex, String, Boolean)
  Constructs an instance to replace either the first, or all occurances
Declaration
  
    public PatternReplaceFilter(TokenStream in, Regex pattern, string replacement, bool all)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | Lucene.Net.Analysis.TokenStream | in | the Lucene.Net.Analysis.TokenStream to process  | 
      
        | System.Text.RegularExpressions.Regex | pattern | the pattern (a System.Text.RegularExpressions.Regex object) to apply to each Lucene.Net.Analysis.Token  | 
      
        | System.String | replacement | the "replacement string" to substitute, if nulla
      blank string will be used. Note that this is not the literal
      string that will be used, '$' and '' have special meaning. | 
      
        | System.Boolean | all | if true, all matches will be replaced otherwise just the first match.  | 
    
  
  See Also
  
      System.Text.RegularExpressions.Regex.Replace(System.String,System.String)
   
  Methods
  
  
    |
    Improve this Doc
  
  
    View Source
  
  
  IncrementToken()
  
  
  Declaration
  
    public override bool IncrementToken()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  Overrides
  Lucene.Net.Analysis.TokenStream.IncrementToken()
  Implements
  
      System.IDisposable
  
  See Also
  
      System.Text.RegularExpressions.Regex