Separate text and numbers in a string

Separate text and numbers in a string

Hello Everyone,

I work as a developer and i developing a systems right now that it has a search area.The fact is that in this area everyone gonna use copy/paste to search something.What i want to do is to separate text from numbers of the pasted string to search the right product.
Example: abc123 is the string. abc is the product category and 123 is the serial number and in my entity (database table) is 2 different entity attributes.How can i separate text from numbers to search the right product?
Hello Ioannis!

You can use Regex Expressions to retreive numbers or letters from a string.

For instance, to get the numbers of String you would do Regex_Replace with an Expression like "/^[1-9][0-9]*$/" , this would return the numbers so in the replace you could set " ". Basicly we remove numbers from the string and stay with the letters only.

From this point on you already have the string split (sort of), you could use the replace again to remove the letters from the whole string again to retreive the numbers.

The regex actions can be found in the Text extension

Hope i made myself clear, anything let me know!

Best regards,
Thanks for the help.I made it and it works fine.