span8
span4
span8
span4
Hi,I'm trying to split some text,based on the value auf another attribute.Unfortunately the AttributeSplitter transformer doesn't accept attribute values comming from inside the workspace,only pubulished parameters as the delimeter.Is there a way to set up individual delimeters for every feature and carry out the splitting upon them?
One Example:
Text_line_data: 2018-06-11 08:39:23| 486.7| 0.0|STATS |62b88ad3-1c54-43b2-b010-479f2141a98a Here comes the text string im interested in.The string wil vary in length for every feature
Desired delimiter: 62b88ad3-1c54-43b2-b010-479f2141a98a
I',m looking for the string that succeeds 62b88ad3-1c54-43b2-b010-479f2141a98a
Thanks for your support!
Assuming that you're looking for the string that succeeds any GUID,you could use the following expression in e.g.an AttributeCreator:
@Substring(@Value(text_line_data),@FindRegEx(@Value(text_line_data),"\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1}")+37)
If you split using the | as a delimiter character and then use a StringReplacer to chop off the 62b88ad3-1c54-43b2-b010-479f2141a98a bit from the correct part.I'm assuming it's different for every feature but will always have that structure.
^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}[ ]as a regex would do the trick
Hope this helps.
© 2019 亚搏在线Safe Software Inc |Legal