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 TokenStream, this TokenFilter may produce Tokens whose text is the empty string.
Implements
System.IDisposable
  Inherited Members
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
  Namespace: Lucene.Net.Analysis.Pattern
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class PatternReplaceFilter : TokenFilter, IDisposable
  Constructors
| Improve this Doc View SourcePatternReplaceFilter(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 | 
|---|---|---|
| TokenStream | in | the TokenStream to process  | 
      
| System.Text.RegularExpressions.Regex | pattern | the pattern (a System.Text.RegularExpressions.Regex object) to apply to each Token  | 
      
| System.String | replacement | the "replacement string" to substitute, if   | 
      
| 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 SourceIncrementToken()
Declaration
public override bool IncrementToken()
  Returns
| Type | Description | 
|---|---|
| System.Boolean | 
Overrides
Implements
      System.IDisposable
  
  See Also
System.Text.RegularExpressions.Regex