Regex for beautify text

Posted by Jensen on Stack Overflow See other posts from Stack Overflow or by Jensen
Published on 2010-05-29T06:18:15Z Indexed on 2010/05/29 6:22 UTC
Read the original article Hit count: 388

Filed under:
|
|

HI,

I would like to create a function that beautify my text. For this I use a regex who remplace some characters, but it not run. Can you give me the regular expression for this :

  • Replace the first letter by a caps
  • Replace any underscore _ by a space

So for example: the_pack_2 will be The pack 2. Thx

© Stack Overflow or respective owner

Related posts about php

Related posts about regex