Function: filter_text

--Usage--
> filter_text(some_string, match: regular expression, in_context: regular expression)
> filter_rule(match: ..., in_context: ...)(some_string)

Filter text by only keeping the parts of the input that match the regular expression.

If @in_context@ is given, the context must also match the string where the match is represented as <tt>&lt;match></tt>.

This function is available in [[script:rule form]].
When the @filter_text@ is used many times the rule form is more efficient, because the regular expression is only compiled once.

--Parameters--
! Parameter	Type			Description
| @input@	[[type:string]]		String to replace in.
| @match@	[[type:regex]]		Regular expression to match.
| @in_context@	[[type:regex]] (optional)	Context to match

--Examples--
> filter_text(match: "a", "banana")  ==  "aaa"
> filter_text(match: ".", in_context:"a<match>", "banana")  ==  "nn"
> filter_text(match: "[xy]", "xyz")  ==  "xy"
>
> f := filter_rule(match: "xx+")
> f("xyzxxyyzz") == "xx"

--See also--
| [[fun:break_text|break_text / break_rule]]
				Break text into parts each matching a regular expression.
| [[fun:replace|replace / replace_rule]]
				Replace text matching a regular expression.
