RE: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Ford, Mike
-Original Message- From: Andre Polykanine [mailto:an...@oire.org] Sent: 14 October 2010 21:42 Hi everyone, I hope you're doing well (haven't written here for a long time :-)). The question is as follows: I have a regexp that would do the following. If the string begins with Re:,

Re: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Richard Quadling
On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote: -Original Message- From: Andre Polykanine [mailto:an...@oire.org] Sent: 14 October 2010 21:42 Hi everyone, I hope you're doing well (haven't written here for a long time :-)). The question is as follows: I have a

Re: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Andrew Ballard
On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling rquadl...@gmail.com wrote: On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote: -Original Message- From: Andre Polykanine [mailto:an...@oire.org] Sent: 14 October 2010 21:42 Hi everyone, I hope you're doing well (haven't

Re: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Richard Quadling
On 15 October 2010 15:45, Andrew Ballard aball...@gmail.com wrote: On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling rquadl...@gmail.com wrote: On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote: -Original Message- From: Andre Polykanine [mailto:an...@oire.org] Sent: 14

Re: [PHP] RegExp question: how to add a number?

2010-10-15 Thread Andrew Ballard
On Fri, Oct 15, 2010 at 11:07 AM, Richard Quadling rquadl...@gmail.com wrote: On 15 October 2010 15:45, Andrew Ballard aball...@gmail.com wrote: On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling rquadl...@gmail.com wrote: On 15 October 2010 10:16, Ford, Mike m.f...@leedsmet.ac.uk wrote:

[PHP] RegExp question: how to add a number?

2010-10-14 Thread Andre Polykanine
Hi everyone, I hope you're doing well (haven't written here for a long time :-)). The question is as follows: I have a regexp that would do the following. If the string begins with Re:, it will change the beginning to Re[2]:; if it doesn't, then it would add Re: at the beginning. But (attention,

Re: [PHP] RegExp question: how to add a number?

2010-10-14 Thread David Harkness
On Thu, Oct 14, 2010 at 1:42 PM, Andre Polykanine an...@oire.org wrote: But (attention, here it is!) if the string starts with something like Re[4]:, it should replace it by Re[5]:. Regular expressions do not support any mathematical operations. Instead, you need to use preg_match() to

Re: [PHP] RegExp question: how to add a number?

2010-10-14 Thread Richard Quadling
On 14 October 2010 21:42, Andre Polykanine an...@oire.org wrote: Hi everyone, I hope you're doing well (haven't written here for a long time :-)). The question is as follows: I have a regexp that would do the following. If the string begins with Re:, it will change the beginning to Re[2]:; if