by: fartsniff |
last post by:
hello all,
here is a preg_match routine that i am using. basically, $image is set in
some
code above, and it can be either st-1.gif or sb-1.gif (actually it randomly
picks
them from about 100...
|
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...
|
by: awebguynow |
last post by:
I ran across this code, and it kind of made me nervous: (as an email
validator)
if ( !preg_match("/.*\@.*\..*/", $_POST) | preg_match("/(\)/",
$_POST) )
1) from bitwise experience with "C",...
|
by: squash |
last post by:
I have a string equal to 'www/' that I want to use in a preg_match. Php
keeps giving me the warning:
Warning: preg_match(): Unknown modifier '/'
How can I escape the string so the / in www/ is...
|
by: Mark Woodward |
last post by:
Hi all,
I'm trying to validate text in a HTML input field.
How do I *allow* a single quote?
// catch any nasty characters (eg !@#$%^&*()/\)
$match = '/^+$/';
$valid_srch = preg_match($match,...
|
by: mantrid |
last post by:
Hello
Found this piece of code using preg_match to check file types during upload
of files.
$allowed_file_types = "(jpg|jpeg|gif|bmp|png)";
preg_match("/\." . $allowed_file_types . "$/i",...
|
by: JanDoggen |
last post by:
function vldLicense($lic)
{
echo "called with lic: ". $lic . "<br>";
echo preg_match('', $lic) . "<br>";
if (preg_match('{4}-{4}-{4}-{4}', $lic) == 0) return false;
return true;
}
gives me:
|
by: chadsspameateremail |
last post by:
I might have found a problem with how preg_match works though I'm not
sure.
Lets say you have a regular expression that you want to match a string
of numbers. You might write the code like this:...
|
by: Thomas Mlynarczyk |
last post by:
Hello,
I want to split a given string into tokens which are defined by regexes:
// example tokens - a bit more complex in real
$tokens = array(
'NUMBER' ='~^\d+~',
'NAME' ='~^+~',
'ANY' ...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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,...
|
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...
|