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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: 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...
|
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...
|