From:             admin at ninthcircuit dot info
Operating system: Linux
PHP version:      5.0.4
PHP Bug Type:     Feature/Change Request
Bug description:  & Integer Matching

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 bug report at http://bugs.php.net/?id=33259&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33259&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33259&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33259&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33259&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33259&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33259&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33259&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33259&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33259&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33259&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33259&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33259&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33259&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33259&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33259&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33259&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33259&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33259&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33259&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33259&r=mysqlcfg

Reply via email to