You haven’t posted your code, so it’s hard to say! Also, your two examples don’t match, so it’s impossible to tell what your input actually is and what you want to do with it.
AppleScript can, in fact parse, text into fields (“text items” in AppleScript parlance) like this:
set originalText to "Date:[current date] | Text text Text"
set astid to AppleScript's text item delimiters -- Store the current delimiter value.
set AppleScript's text item delimiters to " | " -- Set the delimiter to what you want to use.
set theFields to originalText's text items -- Get a list of the text items.
set AppleScript's text item delimiters to astid -- Restore the original delimiter.
return theFields --> {"Date:[current date]", "Text text Text"}
It can also separate text into individual paragraphs:
set originalText to "Test 1
Test 2"
set theParagraphs to paragraphs of originalText --> {"Test 1", "Test 2"}
If you want to put the fields of a " | "-delimited text onto separate lines, you can do this:
set originalText to "Date:[current date] | Text text Text"
set astid to AppleScript's text item delimiters -- Store the current delimiter value.
set AppleScript's text item delimiters to " | " -- Set the delimiter to what you want to use.
set theFields to originalText's text items -- Get a list of the text items.
set AppleScript's text item delimiters to linefeed -- Change the delimiter to a linefeed.
set newText to theFields as text -- Coerce the text items back together with this delimiter.
set AppleScript's text item delimiters to astid -- Restore the original delimiter.
return newText
(* -->
"Date:[current date]
Text text Text"
*)
Afterthought:
If your problem is that you want to get the note from a person in Address Book, this is the way:
tell application "Address Book"
set theNote to note of person "Blah Blah"
end tell