Usage
-
Replace(string search, ContextConfig content)Replaces all occurrences of the search string in every input document with the string value of the returned object. This allows you to specify different content depending on the execution context.
searchThe string to search for.
contentA delegate that returns the content to replace the search string with.
-
Replace(string search, DocumentConfig content)Replaces all occurrences of the search string in every input document with the string value of the returned object. This allows you to specify different content for each document depending on the input document.
searchThe string to search for.
contentA delegate that returns the content to replace the search string with.
-
Replace(string search, Func<Match, IDocument, Object> contentFinder)Replaces all occurrences of the search string in every input document with the string value of the objects returned by the delegate. The delegate will be called for each Match in the supplied regular expression.
searchThe string to search for (interpreted as a regular expression).
contentFinderA delegate that returns the content to replace the match.
-
Replace(string search, Func<Match, Object> contentFinder)Replaces all occurrences of the search string in every input document with the string value of the objects returned by the delegate. The delegate will be called for each Match in the supplied regular expression.
searchThe string to search for (interpreted as a regular expression).
contentFinderA delegate that returns the content to replace the match.
-
Replace(string search, params IModule[] modules)The specified modules are executed against an empty initial document and the resulting document content replaces all occurrences of the search string in every input document (possibly creating more than one output document for each input document).
searchThe string to search for.
modulesModules that output the content to replace the search string with.
-
Replace(string search, Object content)Replaces all occurrences of the search string in every input document with the string value of the specified object.
searchThe string to search for.
contentThe content to replace the search string with.
Fluent Methods
Chain these methods together after the constructor to modify behavior.
-
IsRegex(RegexOptions regexOptions = 0)Indicates that the search string(s) should be treated as a regular expression(s) with the specified options.
regexOptionsThe options to use (if any).
