|
by: Han |
last post by:
I'm wondering if someone can explain why the following works with
preg_match_all, but not preg_match:
$html = "product=3456789&"
preg_match_all ("|product=(\d{5,10})&|i", $html, $out);
$out = 3456789
preg_match ("|product=(\d{5,10})&|i", $html, $out);
|
by: Han |
last post by:
I know this is possible (because preg can do almost anything!), but can't
get a handle on the syntax.
I have an HTML string:
<font size="3"><a
href="http://www.example.com?product=3456789&company=3528">
Mickey Mouse</a></font><br><img width="200" height="200" border="0"
src="http://www.example.com/images/3456789.jpg"><b>$8.00</b>
|
by: greatprovider |
last post by:
i'm starting with a string such as "Na**3C**6H**5O**7*2H**20"
im attempting to match all **\d+ ...once i can match all the double
asterix \d i intend to wrap the \d in "<sub>" tags for display
purposes.
i have been trying to write the correct pattern for 2 weeks now without
any success...i can get preg_replace() to work, with several simple
patterns but when i use preg_match_all, i either get unintended results
or incomplete matches.
|
by: Shuan |
last post by:
I am getting this error. Can it be fixed by setting more than 60 for the
max_execution_time
in php.in file?
Fatal error: Maximum execution time of 60 seconds exceeded in
categorycrawler.php on line 19
on this line i have regular expression
preg_match_all(,,)
|
by: Gilles Ganault |
last post by:
Hello
I need to extract some bits of information from a web page, so
I used preg_match_all. I was wondering if there's a simpler algorithm,
or if that's the way it's done:
===========
preg_match_all("|$regex|smi",$buffer,$matches,PREG_PATTERN_ORDER);
$elements=sizeof($matches);
|
|
by: dysfunct |
last post by:
I'm running a script that at one point will collect <imgtags from
some html. I've been using the following:
preg_match_all("/<img .*?>/",$html,$images);
and I thought it was working well. However, I've notice that some
things i throw at it don't work properly. It seems to be that and
image tag closing itself with "/>" doesn't work, ie <img src="..... " /
Admittedly I know very little about regular expressions. Anyone know
whats going...
|
by: Anthony Smith |
last post by:
I am trying to take a web page and get all of the links. It almost
works, but I am missing a few links.
Here is what I am using.
preg_match_all('/href=?(*)?*>(.*?)<\/a>/i',
$s,$matches,PREG_SET_ORDER);
It will not pick up links like this:
<a class="highlight" href="browse.php?region=West
|
by: swethak |
last post by:
hi,
i write the below code to capture the images from the website when i submit the url.In the same way i want to capture the Text information from the website.plz tell that whats the code for that.plz help me.
<?php
$content= file_get_contents($url);
|
by: loriann |
last post by:
hi,
I have a problem with preg_match function returning empty arrays for my wonderful regexes. However, I can't see what I am doing wrong - maybe one of you could help?
I'm loading the source of a website into variable and then using preg_match_all to extract all occurrences of a string.
it looks like this (where source code is loaded into $page variable):
preg_match ('/<div\s+?id="srNum_\d+?"\s+?class="number">(.*?)<\/div>/', $page,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|