[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] regex in pnet
From: |
minddog |
Subject: |
Re: [Pnet-developers] regex in pnet |
Date: |
Sun, 30 Mar 2003 18:03:18 -0700 |
User-agent: |
KMail/1.5.9 |
On Sunday 30 March 2003 17:12, minddog wrote:
> f_strText="http://www.cannibutter.com";;
> f_strText=Regex.Replace(f_strText,
> @"(^|[^""])(http://|https://|ftp://|mailto:|file://|telnet://|gopher://)([\
>w/#~:.,?+=&address@hidden)([\s.:?\-]*[^\w/#~:.,?+=&address@hidden|$)" ,"$3");
I've gotten it shortened to
@"(.*)/(.*)" that blows chunks
* shrug *
I think this is very bad =X
> throws an exception like this:
> address@hidden:~$ ilrun a.out.exe
> Regex
> Attempt to backtrack forwards
> at System.Diagnostics.Debug.Fail(String, String)
> at System.Diagnostics.Debug.Assert(Boolean, String, String)
> at System.Text.RegularExpressions.Interpreter.Backtrack(Int32)
> at System.Text.RegularExpressions.Interpreter.Eval(Mode, Int32&,
> Int32)
> at System.Text.RegularExpressions.Interpreter.Eval(Mode, Int32&,
> Int32)
> at System.Text.RegularExpressions.Interpreter.Eval(Mode, Int32&,
> Int32)
> at System.Text.RegularExpressions.Interpreter.Eval(Mode, Int32&,
> Int32)
> at System.Text.RegularExpressions.Interpreter.TryMatch(Int32&,
> Int32) at System.Text.RegularExpressions.Interpreter.Eval(Mode, Int32&,
> Int32)
> at System.Text.RegularExpressions.Interpreter.Scan(Regex, String,
> Int32, Int32)
> at System.Text.RegularExpressions.Regex.Match(String, Int32)
> at System.Text.RegularExpressions.Regex.Replace(String,
> MatchEvaluator, Int32, Int32)
> at System.Text.RegularExpressions.Regex.Replace(String, String,
> Int32, Int32)
> at System.Text.RegularExpressions.Regex.Replace(String, String)
> at System.Text.RegularExpressions.Regex.Replace(String, String,
> String, RegexOptions)
> at System.Text.RegularExpressions.Regex.Replace(String, String,
> String)
> at Icaaq.Codeify.MarkupParser.Parse(String, Boolean)
>
>
> .net output according to my friend:
> www.cannibutter.com
>
> I'd call this a headache, I'll investigate.
>
> regards,
--
--minddog( Adam Ballai )
"I try to take it one day at a time, but several of them attack me at once."
-mistyflip