Re: Q: Searching with RE's
Posted in 1995
rs@jengate.thur.de (Rainer Sokoll) wrote: >Hi folks, > >in a character-field I want to search with Unix-RE's with a 4-GL-Program. >The query-expression could look like 077[4,7] and should return fields >containing 07743 and fields with 07745. >HJow to solve the problem? > >thanks, >Rainer The Informix matches expression handles: * zero or more characters ? (any) one character [] any one of the characters between the brackets e.g. [12345] any digit between one and five special characters between the brackets: ^ any one except the ones there e.g. [^12345] any character except any digit between one and five - range of characters e.g. [1-5] any digit between one and five [A-Za-z] any letter The RE and the examples of matched values that you give as example are incomplete. Your RE 077[4,7] Desired matches 07743 07745 A suitable Informix expression can be 077[4,7]* or 077[4,7]? assuming the [4,7] RE is "either 4 or comma or 7". Or maybe [4,7] should be [4-7] ? Maybe you can give us more details... Catalin. -- ========================================================================= Catalin Badea _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/ _/ _/ _/ _/ _/_/ _/ Senior Technical Architect _/ _/_/ _/ _/_/_/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ Tecsys Inc. _/ _/_/_/ _/_/_/ _/_/_/ _/ _/_/_/ ===== cat@tecsys.com =========== include system "disclaimer.4gh" ===== ===== Home Page at http://www.virtualmarketplace.com/it/TECSYSE =======