Solved

Regular Expressoin for first name after comma

Posted on 2009-07-04
2
295 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
ID: 24776223
,(\S+)
0
 

Author Comment

by:baghlaf
ID: 24776238
really, you are very good.

Thanks
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Regular expression patterns 2 72
Pattern for a regular expression 2 43
c# regex: extract & replace text between braces 6 50
Grep - regex - find files matching pattern 2 55
by Batuhan Cetin Regular expression is a language that we use to edit a string or retrieve sub-strings that meets specific rules from a text. A regular expression can be applied to a set of string variables. There are many RegEx engines for u…
Do you hate spam? I do, and I am willing to bet you do as well. I often wonder, though, "if people hate spam so much, why do they still post their email addresses on the web?" I'm not talking about a plain-text posting here. I am referring to the fa…
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…

786 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