Separate a string in letters and numbers

0
Separate a string of type Q023 (as example) in Q and 023 in order to perform operations in the number and convert 023 in 024?  
asked
1 answers
1

If you're using a fixed format, it's easy – just use a substring function and/or combine it with a “find” to split your string. You can then convert your number to an int, add +1 and then convert it back to a string with any leading zeroes (assuming you need a string again).

 

If you're not using a fixed format, you could use a replaceAll() with regex to find any numbers / to find any letters and replace them with ‘’ (so if you find all letters, you'll have all numbers left, and vice versa). 

answered