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 wrote: > On 15 October 2010 15:45, Andrew Ballard wrote: >> On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling >> wrote: >>> On 15 October 2010 10:16, Ford, Mike wrote: > -Original Message- > From: Andre Polykanine [mailto:an...

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

2010-10-15 Thread Richard Quadling
On 15 October 2010 15:45, Andrew Ballard wrote: > On Fri, Oct 15, 2010 at 5:52 AM, Richard Quadling wrote: >> On 15 October 2010 10:16, Ford, Mike wrote: -Original Message- From: Andre Polykanine [mailto:an...@oire.org] Sent: 14 October 2010 21:42 Hi everyone, >>

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 wrote: > On 15 October 2010 10:16, Ford, Mike 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 lo

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

2010-10-15 Thread Richard Quadling
On 15 October 2010 10:16, Ford, Mike 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 regexp that

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: [PHP] RegExp question: how to add a number?

2010-10-14 Thread Richard Quadling
On 14 October 2010 21:42, Andre Polykanine 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 it do

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 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 extract the nu

[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 (attenti

Re: [PHP] Regexp question...

2003-05-28 Thread David Grant
Andrew D. Luebke wrote: > OK, here is the regexp command I am trying to use: > > $split_filename = preg_split('/\./', $_FILES["userfile"]["name"], -1); > > However, when I do a count($split_filename) I don't get what I expect. > For instance if the input is: > > abc.xyz.123 > > I get 2 fro

[PHP] Regexp question...

2003-05-27 Thread Andrew D. Luebke
OK, here is the regexp command I am trying to use: $split_filename = preg_split('/\./', $_FILES["userfile"]["name"], -1); However, when I do a count($split_filename) I don't get what I expect. For instance if the input is: abc.xyz.123 I get 2 from count, why doesn't preg_split put three ele

Re: [PHP] php regexp question

2003-03-25 Thread Marek Kilimajer
Just an idea: In $string replace any occurence of รง to c, search for offsets of francoise, and then add bold tags at the offsets (and end tags at offsets +strlen('francoise')) in the original string. cpaul wrote: hi i've made a small php site that is searching against french documents stored i

[PHP] php regexp question

2003-03-25 Thread cpaul
hi i've made a small php site that is searching against french documents stored in a mysql database. when it comes to rendering search results, the client has asked if the words that were searched for can be highlighted. "no problem!" i thought. just do a regexp replace and wrap a tag ar

RE: [PHP] regexp question - extracting wanted ascii characters only?

2001-04-04 Thread Jorg Krause
> From: Erick Papadakis [mailto:[EMAIL PROTECTED]] > > Hi, > > I need to do a simple thing. I want to read a binary > file (e.g., microsoft word, excel etc) and then > extract only the text from it. I am using simple > fopen() and fread() and when I print out the contents > of the file, it retur

Re: [PHP] regexp question - extracting wanted ascii characters only?

2001-04-04 Thread Christian Reiniger
On Wednesday 04 April 2001 11:23, you wrote: > Is it possible through the regexp to specify that I > only want some of the ASCII characters from the binary > stream? Here is the perl equivalent: > > /([\040-\176\s]{3,})/g > > I want only those words that are minimum 3 characters > and I want

[PHP] regexp question - extracting wanted ascii characters only?

2001-04-04 Thread Erick Papadakis
Hi, I need to do a simple thing. I want to read a binary file (e.g., microsoft word, excel etc) and then extract only the text from it. I am using simple fopen() and fread() and when I print out the contents of the file, it returns me the text but apart from the text, there is some junk which is