Bahamut commented on a Page, $iscaps - % of capital or lowercase   -  Jun 08, 2008

Eh, it works at the very least, but the coding is not really stunning. Perhaps only declare variables once? Also, there are some letters you are missing support for (A-ZŠŒŽÀ-ÖØ-ÞŸ).

Now besides the coding: I find that adding a % to the end of the returned value is completely useless. What if I wanted to use this for a caps kicker? I\'d have to use $remove or $left or so.

But in any case, this is a nice example of regex and how it can be used. Perhaps add a .count property to return the total matches (basically without a percentage)? Good luck.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.