I need help with a regular experssion.
I have my DBman set up so that when users browse by Country from a drop down list it displays a graphic relating to that country.
I'm using the search terms as a reference, which are written to %in, and accessed by $in{'Country'}, so I need to format the country string to call the correct graphic.
By the way, this is my first attempt at a regular expression.
Now i've tried to use $in{'Country"} like this,
$graphic = $in{'Country'}=~regular expression;
the expression being the one I havn't worked out yet, but I carn't seem to return the string no matter what expression I try, only a numeral.
How can I return the Country string from $in{'Country'}.
Also if you can help me out with the regular expression. I,ll give you an example.
Say they select - Antigua & Barbuba, what I need the expression to do is,
1. Remove the blank spaces, if there are any - Antigua&Barbuba
2. Remove the & if there is one - AntiguaBarbuba
3. Return the string in lowercase - antiguabarbuba
4. Return say no more then 10 charactors - antiguabar
thanks
Bob
I have my DBman set up so that when users browse by Country from a drop down list it displays a graphic relating to that country.
I'm using the search terms as a reference, which are written to %in, and accessed by $in{'Country'}, so I need to format the country string to call the correct graphic.
By the way, this is my first attempt at a regular expression.
Now i've tried to use $in{'Country"} like this,
$graphic = $in{'Country'}=~regular expression;
the expression being the one I havn't worked out yet, but I carn't seem to return the string no matter what expression I try, only a numeral.
How can I return the Country string from $in{'Country'}.
Also if you can help me out with the regular expression. I,ll give you an example.
Say they select - Antigua & Barbuba, what I need the expression to do is,
1. Remove the blank spaces, if there are any - Antigua&Barbuba
2. Remove the & if there is one - AntiguaBarbuba
3. Return the string in lowercase - antiguabarbuba
4. Return say no more then 10 charactors - antiguabar
thanks
Bob