39
Views
2
Comments
Please tell me how to get consecutive numbers from a string.
Question
Application Type
Reactive

Hello every one,I want to know how to get consecutive numbers from a string at Outsystsms.

*Get numbers from the right side of the string.

*The number of numbers is random. It may be empty.


"ABC1AA0001"→"0001"

"ABE2ASER01"→"01"

"AERFD"→""

Is there a function that doe's this? or do I need to create that function?


Best Regards  

Tomoko

2018-10-29 08-31-03
João Marques
 
MVP

Hi Tomoko,


You can achieve this very easily with Regex:


In the picture below, I use the pattern [0-9]+$ to get the numbers in the end of the string.

In order to use Regex, you can use it server side using Regex_Search action from Text extension (like on the image below) but also client side. You can see it in use and test it using the Regex How-To forge component, like I did on the image above.


Kind Regards,
João

UserImage.jpg
Tomoko Goto

Hi, João Marques,

Thank you for your answer.

I was able to implement it myself !!!


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.