Arpad Ray wrote:
Note that $ allows a trailing newline, but \z doesn't.
I had to test that before believing you:
php -r
'var_dump(preg_match(#^[a-z]+\$#,abc),preg_match(#^[a-z]+\$#,abc\n),preg_match(#^[a-z]+\z#,abc\n));'
you are right, that could consitute a nice big gotcha in some
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
The enclosing has marks, #, I *think* just encloses the
Dave M G wrote:
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
The enclosing has marks, #, I
On 08/08/06, Dave M G [EMAIL PROTECTED] wrote:
PHP,
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
. stands for
On Tue, August 8, 2006 4:21 am, Dave M G wrote:
Shouldn't this regular expression select everything from the start of
the string to the first space character:
$firstWord = preg_match('#^*(.*) #iU', $word);
It doesn't, so clearly I'm wrong, but here's why I thought it would:
The enclosing
Richard, Adam, Barry, Dave, David,
Thank you all for your helpful advice regarding expressions.
I was able to combine all your advice, and made some additional
discoveries along the way.
The winning expression is:
#^(.*)\s#iU
First, I discovered that sometimes the source text had an
Hey folks
I don't want to just get you to do the work, but I have so far tried
in vain to achieve something...
I have a string similar to the following;
cn=emailadmin,ou=services,dc=domain,dc=net
I want to extract whatever falls between the 'cn=' and the following
comma - in this case
On 14/07/06, Steve Turnbull [EMAIL PROTECTED] wrote:
Hey folks
I don't want to just get you to do the work, but I have so far tried
in vain to achieve something...
I have a string similar to the following;
cn=emailadmin,ou=services,dc=domain,dc=net
I want to extract whatever falls between
I believe someone gave the regex code for it already, but if you wanted to do
it the clumsy way (for those of us who are regex challenged still) here's an
alternative:
$str = cn=emailadmin,ou=services,dc=domain,dc=net;
$argsarray = explode(,, $str);
foreach ($argsarray as $argstr) {
On 7/14/06, Steve Turnbull [EMAIL PROTECTED] wrote:
I have a string similar to the following;
cn=emailadmin,ou=services,dc=domain,dc=net
I want to extract whatever falls between the 'cn=' and the following
comma - in this case 'emailadmin'.
$pattern= /[^=]+=([^,]+)/;
preg_match($pattern,
Ill probably get attacked viciously for this with pitchforks and machetes,
but I get sick and tired of trying to figure out regular expressions a lot
of times, so I use the following functions... getSingleMatch(),
getMultiMatch(), getSingleMatchBackwards()
function
On 2/14/06, Patrick [EMAIL PROTECTED] wrote:
Hi,
I am trying to validate a password, but havent figured out the pattern for
it yet.
The password must contain atleast 6 characters
a-zA-Z0-9_
must start with a
a-zA-Z
and must have atleast one of the following characters
!#%$£
As Curt
Monitor http://seo.weberdev.com
-Original Message-
From: Patrick [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 14, 2006 11:53 PM
To: php-general@lists.php.net
Subject: [PHP] Regular expression
Hi,
I am trying to validate a password, but havent figured out the pattern for
it yet
Weber Sites LTD wrote:
Check out some Regular Expression code examples
To learn more :
http://www.weberdev.com/AdvancedSearch.php?searchtype=categorycategory=Rege
xps
Sincerely
berber
ZONG!
-
No results were found.
* Run this seach again but include PHP Functions in the
: [PHP] Regular expression
Weber Sites LTD wrote:
Check out some Regular Expression code examples To learn more :
http://www.weberdev.com/AdvancedSearch.php?searchtype=categorycategor
y=Rege
xps
Sincerely
berber
ZONG!
-
No results were found.
* Run this seach again
Hi,
I am trying to validate a password, but havent figured out the pattern for
it yet.
The password must contain atleast 6 characters
a-zA-Z0-9_
must start with a
a-zA-Z
and must have atleast one of the following characters
!#%$£
correct passwords would be:
a#aAb08
Plkpod!
t09_#8T
U_p#q#Pq
i
Patrick,
http://regexlib.com/ is a really good site to find examples of regular
expressions.
http://regexlib.com/Search.aspx?k=password should get you a bunch of
results.
Also anything else besides letters and numbers is considered bad
password form.
D
On Feb 14, 2006, at 3:53 PM,
On Tue, Feb 14, 2006 at 10:53:17PM +0100, Patrick wrote:
Hi,
I am trying to validate a password, but havent figured out the pattern for
it yet.
The password must contain atleast 6 characters
a-zA-Z0-9_
must start with a
a-zA-Z
and must have atleast one of the following characters
!#%$�
$last_comma = strrpos($string, ,);
$string = substr($string, 0, $last_comma) . ' and ' . substr($string,
$last_comma);
I probably have a one-off error in there somewhere, or swapped the
order of args in strrpos, but you get the idea.
http://php.net/strrpos
On Mon, January 30, 2006 8:09 am, Barry
commas or neither... preserves spaces
Hope this one works (and that I've read the post right :-/)
Dan
--
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: 03 February 2006 23:34
To: Barry
Cc: php-general@lists.php.net
Subject: Re: [PHP] Regular expression
$last_comma
Simple reg help please
i want to match the last , in a,b,c,d and replace it with and
i tried ereg_replace(,([a-zA-z])*$, and ,$string);
but i forgot how to add the d which is also matched now back to the
and
Can you give any good reg_exp sites where to learn it?
Its long ago since i used
Barry wrote:
Simple reg help please
i want to match the last , in a,b,c,d and replace it with and
Without using a regexp, you could do:
code
$string = 'a,b,c,d';
$letters = explode(',', $string);
$last_letter = array_pop($letters);
$final_string = implode(',', $letters) . ' and '
I've been beating my head against the wall for a while trying to come up
with the RE I need to use. I have a camel case word - let's use
JimJoeBobBriggs. I need to come up with a RE that will fine all the
upper case characters and insert an underscore prior to those characters
with the exception
Chris Boget wrote:
I've been beating my head against the wall for a while trying to come up
with the RE I need to use. I have a camel case word - let's use
JimJoeBobBriggs. I need to come up with a RE that will fine all the
upper case characters and insert an underscore prior to those
On 1/19/06, Chris Boget [EMAIL PROTECTED] wrote:
I've been beating my head against the wall for a while trying to come up
with the RE I need to use. I have a camel case word - let's use
JimJoeBobBriggs. I need to come up with a RE that will fine all the
upper case characters and insert an
Chris Boget wrote:
I've been beating my head against the wall for a while trying to come up
with the RE I need to use. I have a camel case word - let's use
JimJoeBobBriggs. I need to come up with a RE that will fine all the
upper case characters and insert an underscore prior to those
Chris Boget wrote:
I've been beating my head against the wall for a while trying to come up
with the RE I need to use. I have a camel case word - let's use
JimJoeBobBriggs. I need to come up with a RE that will fine all the
upper case characters and insert an underscore prior to those
Chris wrote:
snip
preg_replace('/(?!^)([A-Z])/','_$1','JimJoeBobBriggs');
Ohhhregex-fu black belt. ;)
--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi all,
I want to write regular expression for checking the string format
entered
by user.
the allowed formats are
examples:
10
10,
10,12-10
12-10
that is the valid strings are:
1.
On 9/6/05, babu [EMAIL PROTECTED] wrote:
Hi all,
I want to write regular expression for checking the string format entered by
user.
the allowed formats are
examples:
10
10,
10,12-10
12-10
that is the valid strings are:
1. only integer
2. an integer, range of integers example
Hi all,
I want to write regular expression for checking the string format entered
by user.
the allowed formats are
examples:
10
10,
10,12-10
12-10
that is the valid strings are:
1. only integer
2. an integer, range of integers example 3
and no other characters must be
Hi all,
I want to write regular expression for checking the string format entered by
user.
the allowed formats are
examples:
10
10,
10,12-10
12-10
that is the valid strings are:
1. only integer
2. an integer, range of integers example 3
and no other characters must be allowed.
On Tue, 6 Sep 2005, babu wrote:
Hi all,
I want to write regular expression for checking the string format entered by
user.
the allowed formats are
examples:
10
10,
10,12-10
12-10
that is the valid strings are:
1. only integer
2. an integer, range of integers example 3
and no other
babu wrote:
Hi all,
I want to write regular expression for checking the string format entered by user.
the allowed formats are
examples:
10
10,
10,12-10
12-10
that is the valid strings are:
1. only integer
2. an integer, range of integers example 3
and no other characters must be
HI,
how can i write regular expression for time in 24-hour format i:e, HH:MM:SS.
using preg_match.
thanks
babu
-
How much free photo storage do you get? Store your holiday snaps for FREE with
Yahoo! Photos. Get Yahoo! Photos
Hello babu,
Monday, August 29, 2005, 6:50:32 AM, you wrote:
how can i write regular expression for time in 24-hour format i:e,
HH:MM:SS. using preg_match.
?php
$xtime=19:59:53;
if (preg_match(/([01][0-9]|[2][0-3]):[0-5][0-9]:[0-5][0-9]/, $xtime))
echo Good;
else
echo Bad;
?
--
On 8/11/05, Leon Vismer [EMAIL PROTECTED] wrote:
Hi Robin
Many thanks for this,
how would one extend this to support the following:
$str = insert into userComment (userID, userName, userSurname) values (0,
'Leon', 'mcDonald');
one does not want
$str = insert into user_comment
Hi
I would like to convert from one naming convention within a sql statement to
another.
I have the following,
code
$str = insert into userComment (userID, userName, userSurname) values (0,
'Leon', 'Vismer');
$match = array(
/([a-z]+)(ID)/,
/([a-z]+)([A-Z])/
);
$replace = array(
\$1_id,
n Thu, 11 Aug 2005, Leon Vismer wrote:
Hi
I would like to convert from one naming convention within a sql statement to
another.
I have the following,
code
$str = insert into userComment (userID, userName, userSurname) values (0,
'Leon', 'Vismer');
$match = array(
/([a-z]+)(ID)/,
Hi
Just a quick note; why dont' you search on user since it's the constant
and replace 'user[A-Z]' with 'user_[a-z]' or in the case of userID
'user[A-Z]{2}'
This is part of my problem user will not always be constant, I basically want
to be able to change between two naming conventions.
On 8/11/05, Leon Vismer [EMAIL PROTECTED] wrote:
Hi
I would like to convert from one naming convention within a sql statement to
another.
I have the following,
code
$str = insert into userComment (userID, userName, userSurname) values (0,
'Leon', 'Vismer');
$match = array(
Hi Robin
Many thanks for this,
how would one extend this to support the following:
$str = insert into userComment (userID, userName, userSurname) values (0,
'Leon', 'mcDonald');
one does not want
$str = insert into user_comment (user_id, user_name, user_surname) values (0,
'Leon',
I just plain suck at regex, so I was hoping to get some hints from you
regex experts out there. I'm sure it's been done a thousand times, but
I can't seem to find what I'm looking for with a simple google search:
$phone could be 1234567890 OR
$phone could be 123-456-7890 OR
$phone could be (123)
David Christensen wrote:
I just plain suck at regex, so I was hoping to get some hints from you
regex experts out there. I'm sure it's been done a thousand times, but
I can't seem to find what I'm looking for with a simple google search:
$phone could be 1234567890 OR
$phone could be
I'm hoping someone can help me figure out a regex that will replace
pseudo-HTML codes in a string with desired HTML equivalents. In particular,
I'm trying to implement a message quoting facility, such as when you click
on the 'quote' button in phpBB.
Hi All,
I'm hoping someone can help me figure out a regex that will replace
pseudo-HTML codes in a string with desired HTML equivalents. In particular,
I'm trying to implement a message quoting facility, such as when you click
on the 'quote' button in phpBB.
An example of a source string
I have to check the phone number. I use some regular expression for
this. The phone number can contain only numbers and characters like
+,-,),( and space. The problem is when I use a Perl-style all works as
intended but when I use a Posix-style I've got the Warning: ereg():
REG_ERANGE and the
Kostyantyn Shakhov wrote:
I have to check the phone number. I use some regular expression for
this. The phone number can contain only numbers and characters like
+,-,),( and space. The problem is when I use a Perl-style all works as
intended but when I use a Posix-style I've got the Warning:
Simple functions to check fix if necessary invalid formating of a MAC
address... I seem to be having problems with the global variable $mac
not being returned from the fix_mac() function. Any help is appreciated.
?php
/*
* ex. 00:AA:11:BB:22:CC
*/
function chk_mac( $mac ) {
if( eregi(
On Saturday 22 January 2005 00:12, Jason wrote:
Simple functions to check fix if necessary invalid formating of a MAC
address... I seem to be having problems with the global variable $mac
not being returned from the fix_mac() function. Any help is appreciated.
Your subject says regular
On Fri, 2005-01-21 at 10:12, Jason wrote:
Simple functions to check fix if necessary invalid formating of a MAC
address... I seem to be having problems with the global variable $mac
not being returned from the fix_mac() function. Any help is appreciated.
?php
/*
* ex.
Jason wrote:
Simple functions to check fix if necessary invalid formating of a MAC
address... I seem to be having problems with the global variable $mac
not being returned from the fix_mac() function. Any help is appreciated.
function fix_mac( $mac ) {
global $mac;
It's really weird to
Richard Lynch wrote:
Jason wrote:
Simple functions to check fix if necessary invalid formating of a MAC
address... I seem to be having problems with the global variable $mac
not being returned from the fix_mac() function. Any help is appreciated.
function fix_mac( $mac ) {
global $mac;
It's
Hi,
This is quite simpal problem that i want to made regular expression which can
read this kind of structure...
a,b,c
not like this
1. ,a,a,a
2. a,,,aa,,
3. a,a,a,,,
means simpal structure with comma (a,b,c...)
Thnx
Ankur
--
PHP General Mailing List (http://www.php.net/)
To
Do you even need a regex?
What about
if (strlen($_POST['mobile_number']) != 11
substr($_POST['mobile_number'],0,3) != 447)
{
$error=Invalid Number;
}
On 15 Oct 2004, at 13:38, Shaun wrote:
Hi,
Could anyone help me with a reugular expression for a UK mobile phone
number?
So far I have tried
Hi,
Could anyone help me with a reugular expression for a UK mobile phone
number?
So far I have tried this but with no success
snip
$regexp = /^447[0-9]{9}$/;
if(!preg_match( $regexp, $_POST[mobile_number] )){
$error = Invalid Mobile Number;
/snip
The number nust be 11 numbers long, be
On Fri, 2004-10-15 at 07:45, Gareth Williams wrote:
Do you even need a regex?
What about
if (strlen($_POST['mobile_number']) != 11
substr($_POST['mobile_number'],0,3) != 447)
{
$error=Invalid Number;
}
This doesn't verify that the portion following 447 is also a number.
On Friday 15 October 2004 19:38, Shaun wrote:
Could anyone help me with a reugular expression for a UK mobile phone
number?
So far I have tried this but with no success
snip
$regexp = /^447[0-9]{9}$/;
if(!preg_match( $regexp, $_POST[mobile_number] )){
$error = Invalid Mobile Number;
Shaun wrote:
Hi,
Could anyone help me with a reugular expression for a UK mobile phone
number?
So far I have tried this but with no success
snip
$regexp = /^447[0-9]{9}$/;
if(!preg_match( $regexp, $_POST[mobile_number] )){
$error = Invalid Mobile Number;
/snip
The number nust be 11 numbers
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 15 October 2004 12:39, Shaun wrote:
Hi,
Could anyone help me with a reugular expression for a UK mobile phone
number?
So far I have tried this but with no success
Try is_int($_POST['mobile_number']) or ctype_digit($_POST['mobile_number'])
HTH
Cheers
Chris
Robert Cummings wrote:
On Fri, 2004-10-15 at 07:45, Gareth Williams wrote:
Do you even need a regex?
What about
if (strlen($_POST['mobile_number']) != 11
substr($_POST['mobile_number'],0,3) != 447)
{
You could add is_integer() into the if statement.
On 15 Oct 2004, at 14:07, Robert Cummings wrote:
On Fri, 2004-10-15 at 07:45, Gareth Williams wrote:
Do you even need a regex?
What about
if (strlen($_POST['mobile_number']) != 11
substr($_POST['mobile_number'],0,3) != 447)
{
Hi Michael,
Thanks very much for the assistance, I'll have to investigate further!
Kind Regards,
Aidan Lister
Michael Sims [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Aidan Lister wrote:
Hello list,
I'm pretty terrible with regular expressions, I was wondering if
someone
How can I grap number written in specifec place in html
I try this :
preg_match_all(/ TR
TD bgColor=#e4e4e4
PBtest:\/B\/P\/TD
TD
P(*[0-9])\/P\/TD\/TR
TR/,$html,$match);
Alawi,
You should get some sort of nothing to repeat error. Try moving the * to a +
and putting it after the [0-9]. I'm not sure that the * is picking up anything,
because it's not preceded by anything.
It could be that your $html doesn't match quite right, too (tabs and newlines
differ from
On Thu, 7 Oct 2004 12:12:10 -0500 (CDT), Hans H. Anderson
[EMAIL PROTECTED] wrote:
It could be that your $html doesn't match quite right, too (tabs and newlines
differ from $html to the regular expression). So I tried this with success:
The 's' modifier will assist with matching across
Aidan Lister wrote:
Hello list,
I'm pretty terrible with regular expressions, I was wondering if
someone would be able to help me with this
http://paste.phpfi.com/31964
The problem is detailed in the above link. Basically I need to match
the contents of any HTML tag, except a link. I'm
Hello list,
I'm pretty terrible with regular expressions, I was wondering if someone
would be able to help me with this
http://paste.phpfi.com/31964
The problem is detailed in the above link. Basically I need to match the
contents of any HTML tag, except a link. I'm pretty sure a lookbehind
On Wednesday 29 September 2004 08:46, Ed Lazor wrote:
complain
Today I discovered that my ISP can't upgrade to PHP 5. They use Plesk for
server Administration and PHP 5 apparently breaks Plesk. Plesk says
they'll make PHP 5 support available as soon as it starts coming default on
RedHat
Thanks to everyone who sent in patterns =) They worked like a charm =)
$pattern = /\{\$(.+?)\}/i;
$replacement = \\.\$$1\.\;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
complain
Today I discovered that my ISP can't upgrade to PHP 5. They use Plesk for
server Administration and PHP 5 apparently breaks Plesk. Plesk says they'll
make PHP 5 support available as soon as it starts coming default on RedHat
Enterprise.
/complain
Unfortunately, I now have a bunch of
Howdy,
Regular expressions are a simple way of matching patters.
You can learn more about regular expressions in general here:
http://www.opengroup.org/onlinepubs/007908799/xbd/re.html
If you are interested in using regular expressions in PHP, check out
these sites:
Hello, would someone please help me with my regular expressions? They are so
complex!
Here is what I need to do. I have a string with contents similar to the
following:
BLOCK NAME=TOP
(a bunch of markup code)
/BLOCK
BLOCK NAME=BOTTOM
(a bunch of markup code)
Hi,
Tuesday, September 14, 2004, 6:04:44 AM, you wrote:
r Hello, would someone please help me with my regular expressions? They are so
r complex!
r Here is what I need to do. I have a string with contents similar to the
r following:
r BLOCK NAME=TOP
r(a bunch of markup code)
I'm trying to replace all occurances of the X character in a text
with Y, but only those X's that occur between bold tags (b/b).
--
Romanian Web Developers - http://ROWD.ORG
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From: Skippy [EMAIL PROTECTED]
I'm trying to replace all occurances of the X character in a text
with Y, but only those X's that occur between bold tags (b/b).
?php
$str = 'This X and this X will not be fixed, but bthis X
and/b and hopefully this bX/b should be, along b with
this X also. /b, but
Quoting John Holmes [EMAIL PROTECTED]:
From: Skippy [EMAIL PROTECTED]
I'm trying to replace all occurances of the X character in a text
with Y, but only those X's that occur between bold tags (b/b).
?php
$str = 'This X and this X will not be fixed, but bthis X
and/b and hopefully this
I'm trying to figure out how to formulate a regular expression that
will get me everything following a pound sign (#) up to the first space
or { character. (I'm trying to parse the ids out of a style sheet.)
Can anyone point me in the right direction? I've been searching on the
web for
Daniel Lahey wrote:
I'm trying to figure out how to formulate a regular expression that will
get me everything following a pound sign (#) up to the first space or {
character. (I'm trying to parse the ids out of a style sheet.) Can
anyone point me in the right direction? I've been searching
On Tue, 24 Aug 2004 23:53:53 -0700, Daniel Lahey [EMAIL PROTECTED] wrote:
I'm trying to figure out how to formulate a regular expression that
will get me everything following a pound sign (#) up to the first space
or { character. (I'm trying to parse the ids out of a style sheet.)
Can anyone
Could someone help me with a regular expression? I am not very good at
them. I want to find the following pattern inside a file:
[%string%]
Then extract the string portion to store in array. I would next like to
replace those patterns with html code. That's right you guessed it a
template
First of all, you might want to put more than one % probably like %%%
Reason is, asp users % % like php uses ? ?.
Just a precaution.
You almost had the regex right.
/%[a-z]+%/i
Thans means, starts with a %, can match a-z, at least once (the +
part) but as many times (greedy), then another
Hi All
(B
(Bwill anyone give me a solution to get the name and email address of sender from the
(Bmail text below using regular expression.
(B
(BThe result shud get
(Bname as syed ghouse
(Band
(Bemail as [EMAIL PROTECTED]
(B
(B--- Mail text start ---
(B
(BReturn-Path: [EMAIL
Hi folks. I'm having a little bit of a stupid moment with a regular
expression which I'm hoping someone can lend a hand with.
The regular expression I have right now matches strings between 2 and
1000 characters in length that start with one of the following
characters:
a-z
A-Z
0-9
(
)
and
Howdy folks. Sorry for the message which just showed up truncated.
It's complete in my sent mail, but appeared truncated on the list. Full
message is below. TIA for all help.
Hi folks. I'm having a little bit of a stupid moment with a regular
expression which I'm hoping someone can lend a
* Thus wrote Pablo Gosse:
Here's the working regular expresssion:
/^[a-zA-Z0-9\(\)]{1}[ a-zA-Z0-9\(\)_\,\.\-\'\]{1,999}$/
for starters, that doesn't give me a warning at all.
also, all those escapes arn't needed:
$reg = '/^[a-zA-Z0-9()]{1}[ a-zA-Z0-9()_,.\'-]{1,999}$/';
The ' is only
Robin Vickery sagde:
The S modifier that you're using means that it's storing the studied
expression. If the regexp changes each time around the loop then over
3 iterations, that'll add up. See if removing that modifier helps
at all.
The S modifier wasn't needed, I added it because I
Sorry to post this again but it's a little urgent.
The preg_replace in my script allocates a little memory every time it is called and
doesn't free it again untill the script ends.
I don't know if it is normal behaviour for preg_replace or if it is my reg. exp.
that causes this.
The problem is
On Fri, 18 Jun 2004 08:57:19 +0200 (CEST), Ulrik S. Kofod
[EMAIL PROTECTED] wrote:
Sorry to post this again but it's a little urgent.
The preg_replace in my script allocates a little memory every time it is called and
doesn't free it again untill the script ends.
I don't know if it is
$replace = /^(([a-z]+?[^a-z]+?){.($count).})(.$typedmask.)(.*)/iS;
$with = $1error-start sourcetext=.$corr['sourcetext']. id=.$corr['id'].
group=\.$corr['grupper'].\ class=\.$corr['ordklasse'].\
corrected-from=\.$corr['typed'].\
corrected-to=\.$corr['corrected'].\$3error-end
So I'm trying to implement a simple wiki-like syntax for hyperlinking.
Basically I want to match stuff like [this], where the word 'this' gets
turned into a hyperlink. I have that working, but I want to be able to
escape the opening bracket, so that it's possible to do \[that] without
having
On Thu, May 27, 2004 at 09:59:05AM -0700, Dan Phiffer wrote:
So I'm trying to implement a simple wiki-like syntax for hyperlinking.
Basically I want to match stuff like [this], where the word 'this' gets
turned into a hyperlink. I have that working, but I want to be able to
escape the
Rob Ellis wrote:
On Thu, May 27, 2004 at 09:59:05AM -0700, Dan Phiffer wrote:
So I'm trying to implement a simple wiki-like syntax for hyperlinking.
Basically I want to match stuff like [this], where the word 'this' gets
turned into a hyperlink. I have that working, but I want to be able to
Why isn't my regex working? From everything that I've
read, it should be...
script language=php
$string = [joebob];
if( preg_match( '/\[(\s+)\]/i', $string, $aMatches )) {
print_r( $aMatches );
} else {
echo 'No match was found' . \n\n;
}
/script
Chris
--
PHP General Mailing List
Chris Boget mailto:[EMAIL PROTECTED]
on Tuesday, May 18, 2004 9:55 AM said:
Why isn't my regex working? From everything that I've
read, it should be...
$string = [joebob];
if( preg_match( '/\[(\s+)\]/i', $string, $aMatches )) {
\s Matches any whitespace character; this is equivalent
Chris Boget wrote:
Why isn't my regex working? From everything that I've
read, it should be...
script language=php
$string = [joebob];
if( preg_match( '/\[(\s+)\]/i', $string, $aMatches )) {
print_r( $aMatches );
} else {
echo 'No match was found' . \n\n;
}
/script
Chris
your regex is
- EAS Business Intelligence
[EMAIL PROTECTED]
-Original Message-
From: Tumurbaatar S. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 05, 2004 12:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Regular Expression
There's an input string like {str1,str2,...,strN}. I want to capture
all
There's an input string like {str1,str2,...,strN}. I want to capture
all these strings and due to complexity of them I use a preg_match_all()
instead of simple split. A pattern for the matching strings is ready but
I cannot imagine how to specify that strings are separated by commas
and the last
Hi,
I am trying to create a regular expression for a mobile phone number. The
number must be 12 digits long(0-9) and begin with 447 and have no spaces. So
far I have come up with this but it keeps telling me the number is invalid
even when its correct!
$regexp = /447[0-9]{9}/;
I am trying to create a regular expression for a mobile phone number. The
number must be 12 digits long(0-9) and begin with 447 and have no spaces.
So far I have come up with this but it keeps telling me the number is
invalid even when its correct!
Try this:
$regexp = /447[0-9]{9}/;
101 - 200 of 434 matches
Mail list logo