Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RegEx

former_member194669
Active Contributor
0 Likes
1,102

I need a RegEx for splitting firstname and lastname from a name

a®

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
1,065

Sometimes first name and last name will come with , and some other speical symbols

a®

8 REPLIES 8
Read only

former_member217544
Active Contributor
0 Likes
1,065

Hi,

Does split statement works for your requirement? ( split at var1 at space) ?

Regards,

Swarna Munukoti.

Read only

former_member194669
Active Contributor
0 Likes
1,066

Sometimes first name and last name will come with , and some other speical symbols

a®

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,065

Hello,

So you need to split basically at "Special Characters"?

Can you try with :punct: ? It basically considers these characters:

! ' # S % & ' ( ) * + , - . / : ; < = > ? @ [ / ] ^ _ { | } ~

BR,

Suhas

Read only

0 Likes
1,065

Suhas,

I know SPLIT will work in abap , but i am writing javascript in WDA , So i need RegEx.

a®

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,065

I am out then

Read only

0 Likes
1,065

Hi,

How about something like this?



^[(A-Z)(a-z), '-]*

Please note few characters like comma, space, apostrophe, hyphen. You could add any character that you want.

Does this help??

Read only

0 Likes
1,065

Thanks

That solved my issue

a®

Read only

0 Likes
1,065

Hi,

Wowww....I am glad my JSP knowledge isn't rusting.