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
861

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

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
824

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

8 REPLIES 8
Read only

former_member217544
Active Contributor
0 Likes
824

Hi,

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

Regards,

Swarna Munukoti.

Read only

former_member194669
Active Contributor
0 Likes
825

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

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
824

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
824

Suhas,

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

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
824

I am out then

Read only

0 Likes
824

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
824

Thanks

That solved my issue

Read only

0 Likes
824

Hi,

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