Welcome to WebmasterWorld Guest from 54.225.58.238

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

regex efficiency with the ambiguous, greedy and promiscuous .*

     
11:33 am on Apr 19, 2013 (gmt 0)

Junior Member

joined:Apr 6, 2013
posts:149
votes: 0



System: The following 10 messages were cut out of thread at: http://www.webmasterworld.com/apache/4565193.htm [webmasterworld.com] by phranque - 5:43 pm on Apr 20, 2013 (utc -7)


> Rules with (.*) at the beginning or the middle of a pattern can be
> optimised a LOT.

A lot? The difference is less than a millisecond. It's less than even a microsecond. It's a textbook micro-optimization. When you tell people that this will make a big difference, you're blatantly misinforming them.
10:10 am on June 30, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


I'm done arguing here.
11:56 am on June 30, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10553
votes: 13


.* means match any character zero or more times.
technical or not, how much more ambiguous can you possibly get?
end of that discussion.


this is how ibm's rational functional testing team (as "technical" as it gets) describes .*:

The .* pattern is thus the most promiscuous pattern, matching nearly anything including nothing.

(http://books.google.com/books?id=4NSbIuobgEMC&pg=PT489 [books.google.com]
This 32 message thread spans 2 pages: 32