LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 9 Jan 2009 11:16:48 -0800
Reply-To:   Adriano Rodrigues <adriano@GPP.COM.BR>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Adriano Rodrigues <adriano@GPP.COM.BR>
Subject:   how to find streak of numbers in character string?
Content-Type:   text/plain; charset="us-ascii"

Hi all,

Having character strings, I want know how many streaks of numbers each string has, witch functions may I use for it?

Data strings;

Input string $ 60.;

Cards;

AC BB 203 CC 404

ACX 88 CC

AC BB 20 3CC404

AC BB 915 CC 404

AC BB 03 CC 404

AC BB 503 CC 404 X 55463

BF DDFAR

;

run;

desired output:

string numberstreaks

AC BB 203 CC 404 2

ACX 88 CC 1

AC BB 20 3CC404 3

AC BB 915 CC 404 2

AC BB 03 CC 404 2

AC BB 503 CC 404 X 55463 3

BF DDFAR 0

Thanks!

Adriano


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