|
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 gifs).
then it processes them based off of which image type it selected, either the
st- 's or
the sb- 's.
|
by: Daniel |
last post by:
I've been searching the net and Google news groups for a preg_match
expression that will return true on strings containing (uppercase and
lowercase) characters of A-Z, 0-9 and for instance Swedish characters Å Ä Ö.
It should return false on strings containing stuff like -#¤%\"()=?&/.
The thing is, I don't want to specifically allow Å Ä Ö, I want a more
general rule in case other characters like ü or ø turn up. Is this possible
to do?
...
|
by: aaron |
last post by:
I need some help with validating an email address. Right now, I am doing this:
function sys_is_valid_email ($s) {
if (preg_match ("/^.+@.+\..+$/", $s)) {
return 1;
} else {
return 0;
}
}
|
by: tgh003 |
last post by:
I need help with a regex. Been at it for hours and need some sanity
help :>
I am using preg_match in PHP to strip a IMG html tag. I want to strip
any IMG tag that has /work/doc?g= in the SRC attribute.
The basic one i wrote works but obviously doesnt work when you add the
height/width attribute into it:
"<img src=\"\/work\/doc\?g\=(+)\">"
|
by: stoppal |
last post by:
need to extract all text between the following strings, but not
include the strings.
"<!-- #BeginEditable "Title name" -->"
"<p align="center">#### </p>"
I am using preg_match(????, $s, $results)
|
|
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", I was not at all comforable with
!preg_match()
The manual is not clear about using ! with a non-boolean value.
When using !($var) is ($var) converted to a boolean value, before
|
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, $res_description);
if (!$valid_srch) {
...
|
by: Happy Face |
last post by:
Hi, All,
I encountered this strange problem while using function preg_match.
The following is the php code.
when I set the line:
$text = str_repeat('*', 12500);
preg_match will return 0 for the hard coded regular expression.
but if I set $text to 12499, it will return 1 for a match.
$text = str_repeat('*', 12499);
|
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' ='~^.~' ); // make sure there is always a match
|
by: jeddiki |
last post by:
Hi,
I am wanting to do a simple extraction of the
three key header elements from a web page namely these:
Is the preg_match() function the best way to find them and put them into variables ?
If they are not found of the web page I would like to fill the relevant variable with "Not found".
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: 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...
|