nix, shell, perl, php, mysql and mac os x tips and tricks

Monday, May 10, 2010

Regular expression to select the first 50 chars of a string, respecting words

^(.{50,50}[^ ]*)

No comments:

Post a Comment