is there any thing we can write to keep the right txt to the = sign in
the preg_split. from the following lines
DST-NUMBER-IN=003351287759 6, DST-NUMBER-OUT=98751#33512 877596,
DST-NUMBER-BILL=0033512877 596
i only want 0033512877596, 98751#335128775 96, 0033512877596 15 2164
On Sun, 28 Aug 2005 17:54:52 -0700, voipcanada wrote: is there any thing we can write to keep the right txt to the = sign in the preg_split. from the following lines
DST-NUMBER-IN=003351287759 6, DST-NUMBER-OUT=98751#33512 877596, DST-NUMBER-BILL=0033512877 596
i only want 0033512877596, 98751#335128775 96, 0033512877596
I believe that already answered this. What do you mean by "keep the right
txt to the = sign"?
-- http://www.mgogala.com
no one answered this till now, i need to know the exact code to be
written ,, kind regards
On Sun, 28 Aug 2005 18:13:58 -0700, voipcanada wrote: no one answered this till now, i need to know the exact code to be written ,, kind regards
Look at your previous post and my response.
-- http://www.mgogala.com
Dear Macbri
it does work good but not when we want a file like this to be edited
,,,, please look at the file and if you can suggest some thing http://starkom.com/bill20050820_000000 .. thanks and regards
dear Mladen Gogala
i tryed your suggestions but it does not work ,,,, i need to replace
the in the file above ,, thanks
Instead of using preg_split why not trying to reading and writing file
try out this
//Suppose Your file is bill20050820_00 0000.txt
$file = "bill20050820_0 00000.txt";
$fp = fopen($file,'r' );
$string = fread($fp, filesize($file) );
fclose($fp);
//Array of special charecters you want to replace
$special =
array('DST-NUMBER-IN=','DST-NUMBER-OUT=','DST-NUMBER-BILL=');
$replacements = "";
$string = str_replace($sp ecial,$replacem ents,$string);
//Write back to file
$fp = fopen($file,'w' );
fwrite($fp, $string);
fclose($fp);
+++++++++++++++ ++
if you find it useful plz notify me
KERUL
[ProDesignZ] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lecichy |
last post by:
Hello
Heres the situation:
I got a file with lines like:
name:second_name:somenumber:otherinfo
etc with different values between colons ( just like passwd file)
What I want is to extract some part of it like all names or numbers from
each line, simply text fom between e.g. second and third colon. And turn it
|
by: tdl |
last post by:
Hi everybody,
I'm a regular expressions newbie; I read many tutorials, but need more
experience before becoming indipendent in this field. I need a little
help from you.
How can I split such a formatted string:
UPPERCASEID0: texttexttexttext
UPPERCASEID1: textagaintextagain
textagaintextagain
UPPERCASEID2: textagaintextagain
|
by: Shmuel |
last post by:
Hi,
I have problems in trying to '++' an array value.
Every time I find a city I add it in the array,
and if I find it many times I increment the value (counter)
of the city. Here's the code:
$address = "http://www.cji.co.il/bw040609.txt";
$address_local = "bw040609.txt";
$lines = file($address_local);
|
by: K |
last post by:
I have found a script online that I want to use (I am new to PHP).
It creates dynamic images based on the text that you pass it.
However, no matter how I try, I can't get anything other than a blank white
image.
Can one of you knowledgeable people please have a look at the code below and
help please.
|
by: tgiles |
last post by:
Hi, all.
Been staring at this for a couple of hours now and I find myself
completely bewildered. I suppose it doesn't help that I'm a php newbie.
Nevertheless, I throw myself at your mercy.
I have an array which I am attempting to split off into a new array.
The first array is just a whole bunch of links like so:
http://www.example.com/query?track=http://www.somewhereelse.com/whatever.php
| |
by: Brian |
last post by:
Hi all
Below is a bit of code that opens up and reads a
zip file.
I'm having trouble working out how to read in line
by line. The file I am unzipping is a CSV file and I
need to return each line so I can work on them
Any help would be great
|
by: Pseudonyme |
last post by:
Dear All :
Ever had an httpd error_log bigger than the httpd access log ?
We are using Linux-Apache-Fedora-Httpd 2006 configuration.
The PHP lines code that lead too tons of errors are :
$http_ref= $HTTP_REFERER;
$prog = $_COOKIE;
|
by: sskk |
last post by:
how can i split by blank lines?
split(\r\n\r\n,$arr)
like this?
|
by: pascalito |
last post by:
Hi,
i have a problem with a regular expression.
i want to split a string on character pipe | with preg_split php function.
The string is :
"foo|bar|'hello|world\'abc\'def'|bye"
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |