LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 22 May 2009 10:21:00 -0700
Reply-To:     "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject:      Re: SAS function: find how many time a sentece happen
Comments: To: Mindy <master2005_sas@YAHOO.COM>
In-Reply-To:  A<2babafa2-585d-4834-bc88-ab37d9463f1e@x1g2000prh.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Hi Minday,

If you literally mean "sentences" in a single variable, then IF you have the luxury of knowing ahead of time that the period character IS always used AND that the period character DOES NOT occur for any other purpose such has a decimal point, THEN, you could do something like counting the number of periods. e.g.

data _null_; myvar = 'Hello. Goodbye. Cheers.'; NumberOfSentences = length(myvar)-length(compress(myvar,'.')); put _all_; run;

If your rules are a bit different, you still may be able to establish the right checks within those pattern matching efforts and adjust accordingly.

Hope this is helpful.

Mark Terjeson Investment Business Intelligence Investment Management & Research Russell Investments 253-439-2367

Russell Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Mindy Sent: Friday, May 22, 2009 10:13 AM To: SAS-L@LISTSERV.UGA.EDU Subject: SAS function: find how many time a sentece happen

Hey,

Is there a function to find hom may time a sentence happen in a variable?

Thanks, Minday


Back to: Top of message | Previous page | Main SAS-L page