BBEdit 7 - Selecting text after insertion point to end of current line

I just know this is an app-specific syntax thing, but I’ve poured over BBEdit’s AS list archives and this board, and I’m stuck.

I view payment details through a Safari browser window. I’ve already got a script that loads the source into a new BBEdit text window, and removes all the markup:

tell application "Safari"
	set the_content to source of document 1
end tell

tell application "BBEdit"
	make new text window with properties {contents:the_content}
replace "<([^<]*)>" using "" searching in text 1 of text window 1 options {search mode:grep, starting at top:true}
	select insertion point before character 1 of text window 1
end tell

The above works fine. I have more steps that go through and remove all the line breaks, double returns, etc. Ultimately I’m left with this:

I need to be able to collect all of the information AFTER the “:” in each line.

	set MyName to (find "Name:" options {starting at top:true, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false} with selecting match)
select insertion point after the last character of MyName

gives me this error:

Any assistance is appreciated.

Model: pb tibook 667
AppleScript: 1.9.3
Browser: Safari 312.3.1
Operating System: Mac OS X (10.4)

Jacques, thanks piles for the reply. I should have been more clear in my request. Your script literally retrieves the information I requested - but now I have to do something else with it:

For this:

Payment Details - Order No. 160566
Payment Date:01/18/2006
Payment Amount:$596.73

I need to be able to

set OrderNum to “160566” (there’s no colon, so the ASTID does not work)

And break out the payment date as such:

set PmtMonth to “01”
set PmtDay to “18”
set PmtYear to “2006”

Finally, remove the $ from the payment amount

set PmtAmt to “596.73”

Hey again Jacques - The 2nd script you provided, my system errors on this line

And I’m not sure why.

I was able to use bbedit’s find/replace to remove the $, and then to add a “:” in the Order number so the handler would work smoothly. And it works like a champ!

Thanks so much for your help.