You could look into using the C regular expression functions. In case
you aren't familiar with regular expressions, they allow you to specify
a pattern, in your case something like /.*\d{3}-\d{3}-\d{4}.*/, you can
then use the regular expression to scan a string for instances of the
pattern. The regexec function returns an array of offsets to the
locations in the string that matched the pattern. You can find the
documentation for the function in the ILE C/C++ for iSeries Run-Time
Library Functions manual, which is located here:
Joe Lee
Adventist Health
Senior Programmer/Analyst
Financial Team, IS Department
(916) 774-3347
e-mail: leejd@xxxxxx

>>> mallen@xxxxxxxx 03/12/2004 08:24:54 >>>
I've got a physical file (actually copy of a spool file) containing
#'s in format xxx-xxx-xxxx. I need to send this to a software vendor
for privacy reasons I need to change all the phone #'s to "fictitous"
numbers i.e. change 706-678-9565 to 945-224-4848 or such. The phone
start in a various # of places in the file (i.e. some might start in
position 33 others 55, 87 etc.) I've been racking my brain for a quick
dirty way to this without having to manually edit the file. Any ideas
some of you genius' out there?

Mark Allen
IS Manager
Wilkes Telephone & Electric
11 W. Court Street
Washington, GA 30673
Phone: (706) 678-9565
Fax: (706) 678-1000

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx 
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx 
Before posting, please take a moment to review the archives
at .

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.