Jump to content
UBot Underground

[SOLVED]REGEX TO FIND NAME (LAST, FIRST POSSIBLE INITIAL)


Recommended Posts

trying to figure out the regex to find names in this format:

 

MENJIVAR, LEODAN

 

There is also the possibility of a middle initial following the first name.  Doesn't seem to difficult.  Not sure where I'm going wrong.  Thanks.

Link to post
Share on other sites

(^[a-zA-Z]*(,\s)[a-zA-Z]*)

 

^^^ that is with compulsory comma between names, with no middle initial and with both lower/upper case letters, no digits or other signs allowed.

 

To add a middle initial, I would need to see the format first...

 

You can play with REGEX online (free) here and build your own version easily:

 

http://rubular.com/

 

Good luck!

  • Like 2
Link to post
Share on other sites
(^[a-zA-Z]*(,\s)[a-zA-Z]*)

 

^^^ that is with compulsory comma between names, with no middle initial and with both lower/upper case letters, no digits or other signs allowed.

 

To add a middle initial, I would need to see the format first...

 

You can play with REGEX online (free) here and build your own version easily:

 

http://rubular.com/

 

Good luck!

Thank you very much.

Link to post
Share on other sites

You're welcome!  I'm glad I could help...

 

If you like someone's contribution, you can always hit the LIKE THIS button on the bottom-right corner of the said post.

 

Cheers!

  • Like 1
Link to post
Share on other sites
You're welcome!  I'm glad I could help...

 

If you like someone's contribution, you can always hit the LIKE THIS button on the bottom-right corner of the said post.

 

Cheers!

Yes I can.  Here I was looking for the old +1 and missed the like all together.

Link to post
Share on other sites
Thats why the  "If you liked my post/contribution, hit the  LIKE THIS button ↑↑↑ above"  is there.  Been wanting to steal that idea for a while.

 

I disabled all signatures, so I guess I never seen this...  :rolleyes:

 

Just remember that nobody likes a thanks whore though :P

Link to post
Share on other sites
I disabled all signatures, so I guess I never seen this...  :rolleyes:

 

Just remember that nobody likes a thanks whore though :P

 

I am never telling that to older members, just teaching newbies Forum customary politeness, that's all... 

PLUS, I never said that even to newbies, unless they thanked already, written in the thread... so I honestly don't think I am worth naming names, although I see where that's coming from.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...