|
|
 |
Re: FN-FORUM: help with regular expressions please!
date posted 5th January 2007 11:30
Duncan Glendinning wrote:
>
> Morning!
>
> Right, I have a field in my database, which contains something of the
> form:
>
> Species:Cinnamonum zeylanicum
> Origin: Sri Lanka
>
> Now what I need to do is use some reg expressions to split the field's
> value into two, and save each to a different field, so I have:
>
> Species:Cinnamonum zeylanicum in one, and
> Origin: Sri Lanka in the other.
>
> Obviously, other than Species: and Origin: everything else changes
> from one field to another.
> Any ideas?
So what you are looking for is something that spots the newline? Or an
expression that breaks up the line at the beginning of 'Origin:' ?
If you're splitting the fields anyways, why not have a Species field
that just contains "Cinnamonum Zyelanicum" and an Origin field
containing only the country of origin? It seems a little redundant to
have the same information repeated in every record.
-ben
|
 |
|