Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting varied lengths from middle of string

Status
Not open for further replies.

Tepzepi

Technical User
Sep 29, 2000
19
US
Hi all,

This is a simple one for the seasoned professionals, I just cannot find the answer in any of the threads.Apologies if it has already been covered.

My report is a file system data report to extract number of log files within a directory. The file name is created by imports from servers across the estate. Severs names are different lengths. Sample file names are:
dbimport_SZARSGROUPIS1.log
dbimport_SAP01.log

All I need is a formula to show the server name for each file, i.e. I need to drop dbimport_ and .log. As you can see, the server names differ in length, with no rules dictating a minimum or maximum length.

Crystal 11

Much obliged in advance

Warren
 
try: extractstring({Listof.Filenames},'dbimport_','.log')

'J
 
Thanks 'J

Works like a charm of course.

Regards

Warren
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top