Solved

Regular Expressoin for first name after comma

Posted on 2009-07-04
2
293 Views
Last Modified: 2012-05-07
i have this list of lines
Mohhamd,ali khaled  i need to return afer comma ali
Anzi,moh@@ee salem  i need to return after comma moh@@ee
Moha,salem i need to return salem

i  need to use regular expression pattern.

i have used this pattern ,\w+\s but it's not work for Anzi,moh@@ee salem   because there is a non-word character in this moh@@ee

see that @@ is not @@ exactly but it is an arabic character but the web site translated as @@.

Thanks
0
Comment
Question by:baghlaf
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 300 total points
Comment Utility
,(\S+)
0
 

Author Comment

by:baghlaf
Comment Utility
really, you are very good.

Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have been reconstructing a PHP-based application that has grown into a full blown interface system over the last ten years by a developer that has now gone into business for himself building websites. I am not incredibly fond of writing PHP code o…
As most anyone who uses or has come across them can attest to, regular expressions (regex) are a complicated bit of magic. Packed so succinctly within their cryptic syntax lies a great deal of power. It's not the "take over the world" kind of power,…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now