|
It's been so long since ASP.NET MVC is in place in people still struggle to turn off yellow screen of death in production
|
|
|
|
|
Darn you to Yuma!
I have been doing some work with Extension Methods for Regular Expressions in .net this week.
One in particular can be used like this:
MatchCollection m = somestring.Matches ( somepattern ) ;
This works fine. The method instantiates a Regex object for the specified pattern and returns the result of Matches ( somestring ) . I've been using this for a while now.
Buuut... today I discovered that the MatchCollection and Match classes don't provide access to the Regex object that produced them! Which means I can't iterate the group names -- only the Regex class provides the GetGroupNames() method. (They both have private a field for the Regex .)
Regex.GetGroupNames Method (System.Text.RegularExpressions)[^]
So, when I need to iterate the group names, I can't use my Extension Method.
|
|
|
|
|
You could download the .NET core source code and fix it
|
|
|
|
|
Yuma.... how cruel your judgments.
|
|
|
|
|
PIEBALDconsult wrote: So, when I need to iterate the group names, I can't use my Extension Method.
Why not?
Match theMatch = ...;
foreach (Group g in theMatch.Groups)
{
Console.WriteLine($"{g.Name}: {g.Value}");
}
Match.Groups property[^]
Group.Name property[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Version Information
Available since 4.7
No use to me.
|
|
|
|
|
What, you mean you don't upgrade to the latest version the second it's released?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
|
Seeing the same thing in Chrome on a Mac
|
|
|
|
|
Same on Firefox - I think it's the "forum action" div that's causing the problem:
<div style="margin-top:-70px">
<div class="forum-action">
...
</div>
</div>
Reported as a bug[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Funny you mentioned it. I noticed it earlier in IE...looks correct now!
At any rate, a good chance to freshen up a forum that can get pretty stale!
"Go forth into the source" - Neal Morse
|
|
|
|
|
jsc42 wrote: Admittedly, this is on MS-Edge It's an Edge case, obviously.
|
|
|
|
|
public bool GetName { get; set; }
Marc
Latest Article - Create a Dockerized Python Fiddle Web App
Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny
Artificial intelligence is the only remedy for natural stupidity. - CDP1802
|
|
|
|
|
My name is True (when I'm almost channeling Elvis Costello), so that's a bit of luck.
|
|
|
|
|
But your name is Stewart, not Alison.
|
|
|
|
|
Better get set for the name?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It's obviously intended to hold the name of your offspring or lineage[^].
Or possibly the name of the git[^] who wrote it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I'm assuming that, since it returns a bool, it will throw an exception if no name is present? Otherwise it would have returned a nullable bool ofcourse.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Depending on Who you ask, it might be You better you better you bet.
|
|
|
|
|
Hmm. Maybe this value is used on the eminence front-end?
Software Zen: delete this;
|
|
|
|
|
That needs to be framed; it's a work of art!
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
To name or not to name, that's the question.
|
|
|
|
|
Eww.
Please make it stop...
Software Zen: delete this;
|
|
|
|
|
public bool NameRequired { get; set; }
Software Zen: delete this;
|
|
|
|