473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

help with sorting out messages

i have random mobile number with text messages, how would i go about only viewing the numbers i want for example 1234


i got this but its not working ??
Expand|Select|Wrap|Line Numbers
  1.  
  2.     $m = new Soap_connect;
  3.     #get the messages 
  4.     $get_msg = $m->peekmessage();
  5.     $number_to_match = '447888445445447817814149';
  6.     foreach($get_msg as $msg){
  7.         preg_match('/^(\d{24})(\d{2}\/\d{2}\/\d{4}) (\d{2}:\d{2}:\d{2})SMS\d(.*)/',$msg,$matches);
  8.         if($msg[0] == $number_to_match)echo $msg[4] . "<br />";
  9.         }
  10.  
  11.  
Feb 28 '12 #1
0 1059

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Brad Hagen | last post by:
I am trying to sort a vector of pointers to Foo, and my code looks something like this: vector<Foo*> *pNewVector sort(pNewVector->begin(), pNewVector->end(), Foo::SortFunction );
3
by: Tommo | last post by:
Hello All, whilst I know how to sort an array I am having problems with my situation, what I would ideally like is something like a 'sort keys' action with Perl hashes. I am reading in data and...
3
by: parksch2 | last post by:
I have been trying and trying to properly sort records through a mySQL query. I have hour, minute and AM/PM values stored separately in a database as varchars. I'm trying to concat those, cast them...
5
by: Felix Collins | last post by:
Hi All, does anyone know any cleaver tricks to sort a list of outline numbers. An outline number is a number of the form... 1.2.3 they should be sorted in the following way... 1 1.1 1.2
5
by: JustSomeGuy | last post by:
According to the docs... http://www.cppreference.com/cpplist/sort.html There is a parameter to the std::list.sort method. I don't understand this methods use... I want to sort the list which...
3
by: dc24ua | last post by:
Hello - I need help sorting an xml file. I'd like to sort the xml based on the value found in <colvalue> of the second <col>. <?xml version="1.0" encoding="ISO-8859-1" ?> <?xml-stylesheet...
0
by: k1ckthem1dget | last post by:
I need to display the unsorted list of names and display the sorted list of names. My program is getting a bunch of errors though, and i dont know why. I am getting the following errors. 28:...
0
by: jdprime | last post by:
Hi, I am making a webform, and am trying to populate a dropdownlist with a dataset from a called stored procedure. This is where I run into two problems: 1: How do I get the dropdownlist to...
1
by: Studlyami | last post by:
Alright, I have a list which is constantly getting items added and items removed. I want the user to be able to click the header of the list control and sort the items by the column clicked. Ive...
0
by: Gordon Burditt | last post by:
>Given a text file as input, sort the lines and store in the specified If this is not homework, consider using the UNIX sort utility. There are ports of this program to Windows. The source code...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.