breaking a text file into paragraphs based on strings


Posted on 16th Feb 2014 07:03 pm by admin

I have a text file of email addresses that is all squished together. It looks like this:

abcd@gmail.comfefef@mail.comfefefef@yahoo.comfewferf@mail.net...

What I want to do is insert a paragraph after every instance of "com" or "net" etc so I can read it as a list like this:

abcd@gmail.com
fefef@mail.com
fefefef@yahoo.com
fewferf@mail.net


thank

No comments posted yet

Your Answer:

Login to answer
56 Like 28 Dislike
Previous forums Next forums
Other forums

Most basic form question ever?
Hello,

I want to use this snippet to make sure the fields in a form are ok before processing

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexp

Problem with variable declaration in switch statement
Hello, I am having some trouble assigning a value to a variable inside a switch statement. What I a

Echoing ASCII code
I have a php page that splits a string into chars and then echoes the ASCII code for each char. I'm

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

PHP not creating file.
Its supposed to create a .ini file in the /scriptfiles/users/ with the name they entered into the fi

Baffled by Undefined Index in Simple Array: Please Help!
Hello. I have a form which posts an array to this script. However, I can't seem to access the values

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash