Regular expression to capitalize first letter of words in sentence

2011-04-13 Thread Shlomit Afgin
Hi I need to write regular expression that will capitalize the first letter of each word in the string. Word should be string with length that is greater or equal to 3 letters exclude the words 'and' and 'the'. I tried: $string = lc($string); $string =~ s/\b(\w{3,}[(^the|^and)])\b

Regular expression to capitalize first letter of words in sentence

2011-04-13 Thread Shlomit Afgin
Hi I need to write regular expression that will capitalize the first letter of each word in the string. Word should be word that her length is greater or equal to 3 letters exclude the words 'and' and 'the'. I tried: $string = lc($string); $string =~ s/\b(\w{3,}[(^the|^and)])\b/ucfir

How to recognize apache authentication

2011-04-07 Thread Shlomit Afgin
Hi, I want to build a script that only authenticate users can access. The authentication I want to use is Apache authentication. During the script I need to know the exact person that login. Is there any environment variable that keep this information? Thanks, Shlomit.

Regular expression to delete from a string unseen characters

2011-03-07 Thread Shlomit Afgin
Hi, I have a data that contain unseen characters that I want to delete. The unseen characters can be ^L, ^N and other sign that I cannot copy but I see them in my data. Is someone know which regular can help me. Shlomit.

regular expression for special html characters

2011-02-03 Thread Shlomit Afgin
Hello, I tried to convert html special characters to their real character. For example, converting” to " . I had the string $str = "“ test ” ניסיון "; The string contain also Hebrew letters. 1. first I did: $str = decode_entities($str); It convert the special characters

How Perl script Can know I authorize to Apache

2007-01-04 Thread Shlomit Afgin
Hi, I have a directory that define in a http.conf of apache as password protected (with AuthUserFile, AuthName, etc) When a user arrive to this directory he get few links to a perl script. I want to know, if there is a way in perl to check if the user past okay the authorization to that speci