View Single Post
Old 02-22-2013, 09:24 AM   PM User | #1
bemore
New Coder

 
Join Date: Feb 2013
Posts: 39
Thanks: 14
Thanked 0 Times in 0 Posts
bemore is an unknown quantity at this point
RegEx to change format of input

I'm using

Code:
$cleangc = preg_replace("/[^a-zA-Z0-9\s]/", "", $gamecode);
$cleangc = strtoupper  ($cleangc);
Which does do most of the job, but I'm wondering if this can also make the output character format to be something like [^a-zA-Z\s]-[0-9]

For example slus_123.45 would output as SLUS-12345
bemore is offline   Reply With Quote