ID:               33259
 User updated by:  admin at ninthcircuit dot info
 Reported By:      admin at ninthcircuit dot info
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: Linux
 PHP Version:      5.0.4
 New Comment:

In the submission where it says "Pound: foo# {Returns...}" Ignore the
part where it shows only "foo" .. as this is not a valid matching
result to the specification I supplied for "#".

Thanks


Previous Comments:
------------------------------------------------------------------------

[2005-06-07 03:07:37] admin at ninthcircuit dot info

Description:
------------
I was wondering what the PHP community would think of adding an
"integer matching" feature.

For instance, we have the asterisk ("*") and the question mark ("?")
which denote multiple wildcard matching and single wildcard matching,
respectively. Well, how about adding pound ("#") for multi-character
integer matching and ampersand ("&") for single integer matching as
well?

Output synopsis of corresponding wildcard traits:

Asterisk: foo* {Returns: foo, foo1, foobar, fooasdf, etc.}
Question: foo? {Returns: foo1, fooA, foo^, foo>, foo#, etc.}
Ampersand: foo& {Returns: foo1, foo2, foo3, foo4, foo5, etc.}
Pound: foo# {Returns: foo1,foo234,foo10040,foo71, foo, etc.}

Note the exception in the pound symbol feature: Unlike the asterisk, a
pound being added to a regex indicates that AT LEAST one number must
exist in the compared string in order for it to match. Naturally the
ampersand follows this rule, also.

There are a variety of uses this new feature could have. Traversing
arrays with numeric indeces, searching a file, binary searches, etc.

Thanks
-M




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33259&edit=1

Reply via email to