Solved
use attribute value as regular expression in stringsearcher
I think this should be easy but cannot work out how to use an attribute value as the regular expression in the string searcher transformer.
Best answer by takashi
Hi,
View original
I think it's possible in general. For example:
Attributes of input feature (name: value)
_src: abc123
_regex: ^([a-z]+)([0-9]+)$
Parameter settings of the StringSearcher (refer to the attributes)
Search In: _src
Regular Expression: _regex
Logged result
Attribute(encoded: utf-8): `_matched_characters' has value `abc123'
Attribute(encoded: utf-8): `_matched_parts{0}' has value `abc'
Attribute(encoded: utf-8): `_matched_parts{1}' has value `123'
Attribute(encoded: utf-8): `_regex' has value `^([a-z]+)([0-9]+)$'
Attribute(encoded: utf-8): `_src' has value `abc123'
How's your actual situation?
Takashi
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.