Quantcast
Channel: SCN: Message List - SAP GUI
Viewing all articles
Browse latest Browse all 6448

Re: STRING FUNCTIONS in SCREEN PERSONAS

$
0
0


Hi Startlet,

As Steve suggested, you can use javascript for this.

Check the below example code and you can combine what you want:

 

1. Find out the first occurrences of numbers in a string:

   var r = /\d+/;

   var s = "149054 KOMOATEST";

   alert (s.match(r));

 

2. You want all the numbers in your string

   var r = /\d+/g;

   var s = "635 this is personas 1012";

   var m;

   while ((m = r.exec(s)) != null) {

     alert(m[0]);

    }

 

3. Remove whitespace from string

   var s = "this is my test        personas";

   alert(s.replace(/ /g,''));

 

 

if you want to learn more about regex in js, you might want to check:

JavaScript RegExp Reference

 

Regards,

Sushant


Viewing all articles
Browse latest Browse all 6448

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>