Current location: Hot Scripts Forums » Programming Languages » PHP » Regular expressions problem in php


Regular expressions problem in php

Reply
  #1 (permalink)  
Old 07-20-05, 08:17 AM
EvilDeveloper's Avatar
EvilDeveloper EvilDeveloper is offline
Newbie Coder
 
Join Date: Feb 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Regular expressions problem in php

hello!

I got some problem working on the regular expressions in php.
I want to separate the following pattern of text into two blocks and store each block in the array like this:

pattern: %26%231705%3B%26%231576%3B
==================================

array[1] = %26%231705%3B
array[2] = %26%231576%3B

I am trying to separate the pattern using regular expressions but to no avail!
plz help me and reply ASAP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-22-05, 10:33 AM
pamthieu pamthieu is offline
Newbie Coder
 
Join Date: Jul 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
I don't know on what basis you want to separate the string:

I hope this link will help you do it:
http://us3.php.net/manual/en/function.substr.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-13-08, 07:02 AM
skotona skotona is offline
New Member
 
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
It should be something like

preg_match_all("/\%26.*?\%3B/",$value,$matches);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP multi-dimensional array sorting issue aqw PHP 2 06-25-05 12:09 AM
PHP script problem (please help) osmanmumtaz PHP 0 05-24-05 08:29 AM
php variable problem ashishjha54 PHP 7 05-22-05 01:09 PM
Regular Expressions Problem tylerc PHP 4 01-01-05 05:31 PM
Can anyone help me ? (problem using php variables in html db insert code) chronic_ PHP 2 06-13-04 12:19 PM


All times are GMT -5. The time now is 07:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.