set patternFile to "~/Library/Application Support/BBEdit/Setup/Grep Patterns.xml"
set patternFile to do shell script "echo " & patternFile
tell application "System Events"
tell property list file patternFile's property list item "SavedGrepPatterns"
set SavedGrepPatterns to value of property list items
end tell
end tell
set patternList to {}
repeat with i in SavedGrepPatterns
tell (contents of i)
set end of patternList to " Title: " & its Title
set end of patternList to " SearchPattern: " & its SearchPattern
set end of patternList to "ReplacePattern: " & its ReplacePattern
set end of patternList to ""
end tell
end repeat
set AppleScript's text item delimiters to return
set patternList to patternList as text
tell application "BBEdit"
activate
make new document with properties {text:patternList}
end tell