How to retrieve portion of string

In The following exp

phoneno=codevalue+" "+phoneno

                                    How to retrieve phoneno alone using substring and index function

The 'index' function, return the position the found string.

The 'substring' function, retorna the part of a string, starting by index untill the quantity of the informed chars.


Example1:

index("+55 987654321"," ") = 3

substring("+55 987654321",3,10) = 987654321

lenght("+55 987654321") = 13


letting it dinamic:

var phoneno = "+55 987654321"

var size = lenght(phoneno)


var index = index(phoneno," ")

substring(phoneno ,index,size-index)


any questions, let me know.

Hi Guys,

could u help me in extracting only characters from the alphanumeric string??

For Ex:

"3fAde63ckh2" is my string.

"Adeckh" should be my Output.


You need the Regex function.


Check the forge for that component. 

For more information on regex:

https://regex101.com/


Prathmesh Bari wrote:

Hi Guys,

could u help me in extracting only characters from the alphanumeric string??

For Ex:

"3fAde63ckh2" is my string.

"Adeckh" should be my Output.


Hi Prathmesh,

Please use Regex_Replace function.



It is given an output as you expected

"fAdeckh"

Hope this will help :)

Best Regards,

Amit Verma

Prathmesh Bari wrote:

Hi Guys,

could u help me in extracting only characters from the alphanumeric string??

For Ex:

"3fAde63ckh2" is my string.

"Adeckh" should be my Output.


Hi Prathamesh,

You can use jquery or javascript fot this. here is the code

SyntaxEditor Code Snippet

function alphaOnly(a) {
    var b = '';
    for (var i = 0; i < a.length; i++) {
        if (a[i] >= 'A' && a[i] <= 'z') b += a[i];
    }
    $(".Abc").val(b);
}

see the below link

https://rahul-sahu.outsystemscloud.com/BPT_Test/test.aspx


If you need to serverside you have to find component or create own code in .net and intgrated in OS 

and i think regax is use for validation


THanks 

Rahul Sahu

Hi Karthik,

If you are creating a web app, use the Regex_Replace Action from the Text Extension. If you are creating a mobile app, you can either create a JavaScript function yourself (though don't use JQuery, that's discouraged for performance reasons!), but you could also search the Forge to see if there's something like that available.