Re: checking for characters
Re: checking for characters
- Subject: Re: checking for characters
- From: Michelle Steiner <email@hidden>
- Date: Tue, 9 Sep 2003 21:53:33 -0700
On Tuesday, September 9, 2003, at 03:59 PM, Tait Sanders wrote:
What I'm wanting to
check for is that there are characters and then a '.' followed by more
characters. I don't care how many characters before or after but there
has to be at least 1 one either side.
set text item delimiters to {"."}
set test_list to text items of test_string
set _count to count (test_list)
if _count is 1 then
display dialog "There is no period in the string."
--handle the case as needed
else if _count > 2 then
display dialog "There is more than one period in the string."
--handle the case as needed
else if the first item of test_list is "" or last item of test_list is
"" then
display dialog "There are no characters either before or after the
period."
else
--handle the case as you need
end if
--
"Condoms encourage promiscuity
- in the same way that seat belts encourage automobile accidents."
O.C. Brown
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.