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

Remove leading zero, space and dash in existing column and return the output in new column

syazwaansyazwaan Member Posts: 3 Learner I
I have a dataset something like this:

I want to remove leading zero, space, and dash in column_1 and return the new data in a new column.

Expected output:


Thank you.
Tagged:

Best Answer

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi!

    The easiest way to do this is Generate Attributes with the replaceAll function.

    It takes three parameters: The name of the attribute to read (column_1), the regular expression to search for, and the replacement (the empty string "").
    A regular expression to find leading spaces, zeros and dashes would be this: ^[0 -]+

    Regards,
    Balázs
Sign In or Register to comment.