The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Save regex capturing group for use later
Hi,
I'm reading in multiple sheets from an excel file and the first element contains an identifier for the data rather than an attribute name. I'm using "Rename by Replacing" to change the attribute name to something more appropriate but I'd like to keep the regex capture response for later use when I create an new attribute and start to append all the sheet processing results together.
I've looked at logging and extracting to macro but the logging only logs the regular expression, not the result of the regex operation.
Any ideas?
I'm reading in multiple sheets from an excel file and the first element contains an identifier for the data rather than an attribute name. I'm using "Rename by Replacing" to change the attribute name to something more appropriate but I'd like to keep the regex capture response for later use when I create an new attribute and start to append all the sheet processing results together.
I've looked at logging and extracting to macro but the logging only logs the regular expression, not the result of the regex operation.
Any ideas?
0
Best Answer
-
BalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 UnicornHi!
I guess the following could work.
Loop Attributes
Inside Loop Attributes: Generate Macro with the regexp replace result. Rename using the generated value. Save the original and changed values, e. g. by appending the result of Generate Data by User Specification to an example set.
Regards,
Balázs6
Answers
Thanks for that, finally got it to work.