daGrevis Posted June 24, 2010 Report Share Posted June 24, 2010 $characters = 'abcdefghijklmnopqrstuvwqyzABCDEFGHIJKLMNOPQRSTUVWQYZ0123456789'; Būtu teicami, ja to varētu kaut kā izdarīt ar regex'u! =) Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted June 24, 2010 Report Share Posted June 24, 2010 (edited) Ko tieshi? Tie visi iekljaujas "[a-zA-Z0-9]" Edited June 24, 2010 by rATRIJS Quote Link to comment Share on other sites More sharing options...
daGrevis Posted June 24, 2010 Author Report Share Posted June 24, 2010 Nu to es zinu, bet es domāju kā to varētu pierakstīt īsāk, t.i.... $characters = "/[a-zA-Z0-9]/"; Nu tikai, lai, protams, strādātu. Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted June 24, 2010 Report Share Posted June 24, 2010 Atkariibaa ko tu ar vinjiem peectam gribi dariit...iisaak ne vienmeer ir labaak... Quote Link to comment Share on other sites More sharing options...
daGrevis Posted June 24, 2010 Author Report Share Posted June 24, 2010 Rezultātā vajag šādu mainīgo. string(62) "abcdefghijklmnopqrstuvwqyzABCDEFGHIJKLMNOPQRSTUVWQYZ0123456789" Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted June 24, 2010 Report Share Posted June 24, 2010 Nav nekas aatraaks un labaaks par vienkaarshu stringa defineeshanu... Quote Link to comment Share on other sites More sharing options...
daGrevis Posted June 24, 2010 Author Report Share Posted June 24, 2010 Skaidrs. =) Quote Link to comment Share on other sites More sharing options...
rausis Posted June 24, 2010 Report Share Posted June 24, 2010 http://php.net/manual/en/function.range.php Quote Link to comment Share on other sites More sharing options...
codez Posted June 24, 2010 Report Share Posted June 24, 2010 echo implode(array_merge(range('A', 'Z'), range('a', 'z'),range(0, 9))); Bet labāk jau definēt uzreiz kā stringu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.