On Dec 16, 2007, at 3:57 PM, D. Turnbull wrote:

I have a string that I need to split into an array. The string always
follows this format:

[Alpha w/spaces], [Alpha w/spaces] [Number] [Date] [Alpha w/spaces]
[Number w/ comma/dot] [Number w/ comma/dot] [Alpha]

Dave, it should be something like this:

[A-Za-z\s]+, [A-Za-z\s]+, [0-9]+ [dd-dd-dddd] [A-Za-z\s]+ [0-9,\.] [0-9,\.] [A-Za-z]

This assumes a date of mm-dd-yyyy. This doesn't "capture" anything, which you'll probably want to do by putting parentheses around groups. I can help you with specifics if you want to talk off-list.

Richard




_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to