Welcome to WebmasterWorld Guest from 54.163.23.73

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

regex efficiency with the ambiguous, greedy and promiscuous .*

     

Dideved

11:33 am on Apr 19, 2013 (gmt 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.

g1smd

10:10 am on Jun 30, 2013 (gmt 0)

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



I'm done arguing here.

phranque

11:56 am on Jun 30, 2013 (gmt 0)

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



.* 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
 

Featured Threads

Hot Threads This Week

Hot Threads This Month