why ^*$ matches "127.0.0.1"
i don't understand, since does following unchanging expression:
^*$
match twine "127.0.0.1"? controlling regex.ismatch("127.0.0.1", "^*$");
using expresso, does match, also i expect. controlling countenance ^.*$
does review string, i also expect.
technically, ^*$
should review commencement string/line any array times, followed finale string/line. seems * many treated .*
what am i missing?
edit:
run following an instance problem.
using system;
using system.text.regularexpressions;
namespace regexfubar
{
category program
{
stationary vacant main(string[] args)
{
console.writeline(regex.ismatch("127.0.0.1", "^*$"));
console.read();
}
}
}
i wish have ^*$ review string, i am wondering since does review it. i cruise countenance should outcome an difference being thrown, during slightest non-match.
edit2:
to pristine adult any confusion. i regex idea carrying review "127.0.0.1". user the concentration entered countenance wondered since matched twine should not. after looking during it, i adult an reason since matched - generally given expresso .net seems hoop differently.
i speculation doubt answered being due .net doing avoiding throwing an exception, even guess it's technically an crude expression. nonetheless unequivocally want?
Comments
Post a Comment