[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Regular Expression - cut off string

Posted on 2006-04-13
2
Medium Priority
?
275 Views
Last Modified: 2012-08-13
i have a string that would be like this

"test@here.com, andhere@nowhere.com, here@here.com"

i want it to be converted to

"test@here.com, ..."

thanks
0
Comment
Question by:jmingo
2 Comments
 
LVL 37

Accepted Solution

by:
Harisha M G earned 80 total points
ID: 16448827
Hi,


$yourstring = q<test@here.com, andhere@nowhere.com, here@here.com>;

$yourstring =~ s/,.*/, .../;

print $yourstring;

---
Harish
0
 

Author Comment

by:jmingo
ID: 16448939
worked great. thanks
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Six Sigma Control Plans
Suggested Courses

834 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