Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing ideas, maybe regular expression search
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00882554
Message ID:
00882565
Vues:
14
>I have a large text file that contains !! in various places. It also contains single !'s. I
>would like to look for just the single !'s. I didn't really want to get into the WScript regular
>expression thing ( for one, I wouldn't even know what the regular expression would look like ).

I couldn't resist looking it up: it seemed more useful than checking for "OCCURS('!') and not OCCURS('!!')", or something to that effect.
loRegExp = NEWOBJECT("_regexp", HOME(1) + "ffc\_regexp.vcx")
loregexp.pattern = "![^!]|[^!]!$"  && Match a exclamation point not followed by
                                   && another one, or one at the end of the line
                                   && not preceded by another one.
?loregexp.execute("!u")            && Matches
?loregexp.execute("u!")            && Matches
?loregexp.execute("!")             && Doesn't match
?loregexp.execute("!!")            && Doesn't match
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform