Subject: on Facelift and divorce rumors-

From: The Scoop on Ellen DeGeneres <[email-masked]>
Date: Sat, 21 Feb 2015 12:46:55 -0800

Everyone is buzzing about Ellen's Divorce and Facelift Rumors
Whats true....Whats False??
............................................................

The jury is still out about the divorce...
But Enough is enough. Did Ellen Degeneres get a facelift or not?

The answer here: / http://www.collensskinhealth.com/25585-8146_cuppy_majuscule.htm

Ellen Show Team
See the pics that Sparked the Rumors: / http://www.collensskinhealth.com/25585-8146_cuppy_majuscule.htm

We hope you enjoyed this celeb gossip tid-bit from Member Update Systems
to stop further messages -write- 9 1 6 7 Road 177| Oakwood, OH 45873 or http://www.collensskinhealth.com/crowfoots/510/453-263-basifiers_stonewall.php

/ A case insenstive replace function.
    /// </summary>
    /// <param name="originalString">The string to examine.(HayStack)</param>
    /// <param name="oldValue">The value to replace.(Needle)</param>
    /// <param name="newValue">The new value to be inserted</param>
    /// <returns>A string</returns>
    public static string CaseInsenstiveReplace(string originalString, string oldValue, string newValue)
    {
        Regex regEx = new Regex(oldValue,
           RegexOptions.IgnoreCase | RegexOptions.Multiline);
        return regEx.Replace(originalString, newValue);
		I do not think it's possible. With REs, you see if a piece of data (string) matches an expression (the RE: a program if you will). You now have to pieces of data - neither is a (proper) RE. To find the longest common prefix, you need "something" that takes both as inputs... but REs don't do that: some glue is needed.   I am happy with a glue solution - maybe convert one of the strings to regexp and than use it on the second one  gorn Feb 2 '12 at 15:12
Are the two strings random input or one of them has privileges? In the second case (for example the string is reused multiple times for the same matching) some would be worth to do.   dolmen Feb 2 See also:  (PHP; not sure if it applies to Python too)   b 7 '12 at 17:29
My solution below addresses the issue that Alien Life Form raises. You have two inputs and an output. Perl-style pseudo-regular expressions don't allow this. But a more general approach is possible. Another issue that has oddly gone unmentioned, is that lcp is most commonly used in the context of suffix arrays, and in this context there are linear time algorithms for finding the complete lcp table. The most well known is by Ko et al.   Dale  I like you trying to analyse the task in general way, but I do not know lcp tables. Link? BTW - clearly the posted solution somehow deals with the fact that there are two imputs by creatively combining first and second in one inpot (not mentioning the excellent  little bit non regexpish xor solution). ThankI've edited my answer to give a more efficient version -- but it's still probably on the order of n-squared, because each time the first string has to be re-backtracked, the \1 part has to be re-matched in its entirety. That is -- suppose that 
 the two strings have no common prefix at all. Then the regex has to try every single prefix of the first string and see if the second string starts with it. Merely checking the prefix is already O(n) time, and it needs to be done n tim I do not think that the O(n2) argument is correct in practice - if they do not have the common prefix the checking of \1 after the \0 separator always fails at the first character. In fact the shorter the prefix is the faster the lookup is. The problem has nice strange properties - if you would be able to start with short string and extend it (in \1) than you basically use the obvious programatical solution. However regexp works exactly the opposite way - it tries the longest and makes it shorter and shorter.