oops. The expression should read '/\[([^\]]+)\]/'
Thanks all, i used this code and it works:
preg_match("/\[(.+)\]/",$msg_array[$i],$segments);
$title = trim($segments[1]);
$description = ereg_replace("\[ $title \]", "", $msg_array[$i]);
Does anyone know a good regex
2001 06:25
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Regular Expression
oops. The expression should read '/\[([^\]]+)\]/'
Thanks all, i used this code and it works:
preg_match("/\[(.+)\]/",$msg_array[$i],$segments);
$title = trim($segments[1]);
$d
On Jue 19 Abr 2001 00:23, Andrew Braund wrote:
LinuxSA http://www.linuxsa.org.au/ meeting a couple of days ago was
on regex, some notes are at;
http://www.fornax.net/regex2/
or part 1 at;
http://www.fornax.net/regex/
Isn't there a place with printable versions?
Saludos... :-)
--
El
I want to delete everything after a tab (or space) on each line of
a text file and can't figure it out.
An example line is
ARIA 5.19 -0.0625 -1.19 5.25 4.5 48.5 100300
you can explode on a tab $arrlines = explode("\t", $the_line);
then save $arrlines[0] from every line.
Don't know if
From: "Dan Watt" [EMAIL PROTECTED]
Im trying to build a user login system, and when there is a new user, I
need
to validate that they are usign using word characters ([0-9A-Za-z_] or
\w)... I have TRIED MANY different regular expressions to test this, but
none work. This seems so simple but
ok, that was my problem Was using ereg... All the places I read about
how to do regular expressions (book, online...) did NOT clarify that \w and
such would need preg.. Thanks!
""Simon Garner"" [EMAIL PROTECTED] wrote in message
022d01c09fa6$a2bbd460$[EMAIL
From: "Dan Watt" [EMAIL PROTECTED]
ok, that was my problem Was using ereg... All the places I read about
how to do regular expressions (book, online...) did NOT clarify that \w
and
such would need preg.. Thanks!
No prob - yeah, \w is a Perl feature :)
(preg = PCRE = Perl Compatible
The ? meta-character is used for matching zero or one occurence of the
preceding character , in this case , l .
T'his means that you'll match all words that begin with 'Wi' and continue
with one or zero 'l' .
HTH
Sorin Ifrim
- Original Message -
From: Dhaval Desai [EMAIL PROTECTED]
To:
At 21:23 18/02/2001 -0800, Dhaval Desai wrote:
I am not able to understand this REgular expression.
/Wil?/
English Translation: Find a string that contains "Wi" that may or may not
be followed by "l".
In pure "does the string match?" terms, your example is equivalent to
/Wi/
would match
[rearranged back to bottom-posting order, for clarity]
In article 012901c09a35$7b64c640$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Ifrim
Sorin") wrote:
I am not able to understand this REgular expression.
/Wil?/
The ? meta-character is used for matching zero or one occurence of the
I 'd like to have an input that contains only a to Z and space and
- nothing else like numbers or whatever and also does not
start
with space !
till now with ur help i get the following :
(!ereg("[a-zA-Z[:space:]-]", $name))
All those weird characters you typed are not ASCII, and are not
In article 005801c08668$e0459070$0201010a@shaggy, "Jamie Burns"
[EMAIL PROTECTED] wrote:
I tried something like this and your examples worked:
$str = "tag element = \"value\" nextelement";
if (eregi("=[[:space:]]*\"([^\"]+)|=[[:space:]]*([[:alnum:]]+)",$str,$regs)) {
print("yes -
On Monday 15 January 2001 09:03, Fai wrote:
^.+@.+\\..+$ This regular expression can check if the email address is
valid. But it cannot validate the email address with two "@", does
I use this code:
/*
* Check whether the supplied string is a
* (syntactically) valid email address
* Only
301 - 313 of 313 matches
Mail list logo