CarleenHop,
You will need to use InStr() and Mid() for this.
InStr() will return the character position of the first character of a sought string. Use this to define your starting point. You can do the same for your ending postion by searching the next heading and subtracting the number of characters.
The formulas should look something like this. Though these will work, even if something is entered before your example above as well.
{@ExtractName}
Note: "name - " is 7 characters
Code:
Mid({YourField},InStr(1,{YourField},"name - ")+7,(InStr(1,{YourField},"size - ")-(InStr(1,{YourField},"name - ")+7)-1))
The last "-1" assumes a space between all your text. Remove if uneeded.
If you will NEVER have text before the name, you can use:
Code:
Mid({YourField},7,(InStr(1,{YourField},"size - ")-(InStr(1,{YourField},"name - ")+7)-1))
{@ExtractSize}
Note: "size - " is 7 characters
Code:
Mid({YourField},InStr(1,{YourField},"size - ")+7,(InStr(1,{YourField},"color - ")-(InStr(1,{YourField},"size - ")+7)-1))
The last "-1" assumes a space between all your text. Remove if uneeded.
{@ExtractColor}
Note: "colour - " is 9 characters
Code:
Mid({YourField},InStr(1,{YourField},"colour - ")+9)
With the # of characters clause left out, this will return all characters in the memo field after "colour - ". You will need to flag the number of characters the same as the other formulas if there is data after this in the memo field.
I tested with:
"name - [red]MyTestName[/red] size - [red]TestSize[/red] colour - [red]FavColour[/red]"
each formula returned the text marked in red.
Hope this helps! Cheers!
Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."