On Fri, Jan 22, 2010 at 2:30 PM, MB Software Solutions, LLC <[email protected]> wrote: > Peter Cushing wrote: >> MB Software Solutions, LLC wrote: >>> I need to search a whole bunch of files and identify where a text string >>> does NOT exist. My colleague says he thinks there's a regular >>> expression for what I need, and our utility (Search and Replace, from >>> funduc.com) allows for RegExp. >>> >>> Can someone fluent in RegExp tell me what I should use for the expression? >>> >>> >> Why don't you just search the files for the string and if you don't find >> it, it does not exist. >> Is there some other reason for not using that approach? > > > Forget it...I already wrote script that basically did a FILETOSTR and > then searched for the text via something like NOT("text=123" $ > lower(lcFileToStr)) and that got me what I needed. > > Thanks anyway. ---------------------------- How to do it in VFP: http://durl.me/abfj
This is a good heads up on HOW to match complicated ones http://www.radsoftware.com.au/articles/regexlearnsyntax.aspx When using C# it is a lot easier in that the class for RegEx. // First we see the input string. string input = "/content/alternate-1.aspx"; // Here we call Regex.Match. Match match = Regex.Match(input, @"content/([A-Za-z0-9\-]+)\.aspx$", RegexOptions.IgnoreCase); // Here we check the Match instance. if (match.Success) { // Finally, we get the Group value and display it. string key = match.Groups[1].Value; Console.WriteLine(key); } -- Stephen Russell Sr. Production Systems Programmer SQL Server DBA Web and Winform Development Independent Contractor Memphis TN 901.246-0159 _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

