Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing ideas, maybe regular expression search
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00882554
Message ID:
00882565
Views:
12
>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?
Previous
Reply
Map
View

Click here to load this message in the networking platform