Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
On 4 October 2010 16:10, Adam Richardson wrote: > On Mon, Oct 4, 2010 at 6:29 AM, Richard Quadling wrote: > >> >> http://pastebin.com/rsV35czb >> >> Code with tests and output. >> >> > Nice code, Richard. > > Adam Thank you. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.

Re: [PHP] Little Parsing help...

2010-10-04 Thread Adam Richardson
On Mon, Oct 4, 2010 at 6:29 AM, Richard Quadling wrote: > > http://pastebin.com/rsV35czb > > Code with tests and output. > > Nice code, Richard. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com

Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
On 4 October 2010 11:26, Richard Quadling wrote: > On 1 October 2010 16:20, Don Wieland wrote: >> The logic I need is pretty straight forward, but I am having a hard time >> replicating it using PHP functions. I will try to break it down to it's >> simplest form: >> >> I have a field that has sev

Re: [PHP] Little Parsing help...

2010-10-04 Thread Richard Quadling
On 1 October 2010 16:20, Don Wieland wrote: > The logic I need is pretty straight forward, but I am having a hard time > replicating it using PHP functions. I will try to break it down to it's > simplest form: > > I have a field that has several lines of text. Chords and Song Lyrics. > > The "Chor

Re: [PHP] Little Parsing help...

2010-10-02 Thread chris h
Don, How far along are you? To get started something like this may work for you... preg_match_all('/[A-G]{1}#?/', $line, $matches); That SHOULD return each note of the line (you can retrieve them via the $matches array), given that there are no other upper-case characters that are not notes. Al

Re: [PHP] Little Parsing help...

2010-10-01 Thread Don Wieland
The logic I need is pretty straight forward, but I am having a hard time replicating it using PHP functions. I will try to break it down to it's simplest form: I have a field that has several lines of text. Chords and Song Lyrics. The "Chord" lines begin with an asterisk "*" and end with the

Re: [PHP] Little Parsing help...

2010-10-01 Thread Richard Quadling
On 1 October 2010 14:35, Don Wieland wrote: > Hello, > > I am building a web Song DB. That will simple song chord charts in the DB. >  I would like the ability to do KEY changes for the different songs. I am > looking for some direction on how to do this. This was my original thought > but I  am o