Re: Pls Help: Splitting An String
- From: "Mumia W." <mumia.w.18.spam+nospam.usenet@xxxxxxxxxxxxx>
- Date: Sun, 27 Aug 2006 17:31:35 GMT
On 08/27/2006 04:39 AM, Unknown wrote:
Hi All,
First of all, I am fairly new to PHP and am in all honesty a "modifier" rather then a "coder", but I am trying to learn.
If this is the wrong group to post, I would apprichate some forums / newsgroups or websites that I could be directed to.
Here is my problem...
I host a killboard for a game (Eve Online) and the killboard has the following code...
if( preg_match("(^Destroyed\:.*?)", trim($arrLines[$i])) && $strMode == 0) {
$strVICTIMTYPE = trim(substr(trim($arrLines[$i]), 11, strlen($arrLines
[$i])));
....what this does is put whatever is past "Destoyed:" into the "$strVICTIMTYPE" string.
Now things have changed with the way some information is presented and we can have the following information...
Destroyed: <Various> Control Tower / <Various> (Laid The Final Blow)
What I need to do is manage this line output so...
"<Various> Control Tower" goes into one string.
" / " is ignored.
"<Various>" goes into another string.
" (Laid The Final Blow)" is ignored.
preg_match('/(.*?) Control Tower \/ (.*?) \(Laid The/', $string, $matches)
....I would truely apprichate any assistance here. As I am going around^^^^^^^^^^
appreciate
in circles.
Many thanks.
.
- References:
- Pls Help: Splitting An String
- From: Unknown
- Pls Help: Splitting An String
- Prev by Date: forward http:// to http://www every time?
- Next by Date: Re: forward http:// to http://www every time?
- Previous by thread: Pls Help: Splitting An String
- Next by thread: Getting automatically correct delimiter for platform
- Index(es):
Relevant Pages
|