Hi
I am a kind of newsbie in perl and in regex
I would like to applys many regex to (my $cat_name_e = $cat->{cat_name})
So here is what I did : regex are good (I guess) but it is to way I did apply these regex to (my $cat_name_e = $cat->{cat_name}) that is wrong...
(my $cat_name_e = $cat->{cat_name}) =~s/[éèê]/e/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/[àâ]/a/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/ô/o/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/î/i/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/ç/c/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/\W/-/g; #replace all non alphanumerics by hyphens
(my $cat_name_e = $cat->{cat_name}) =~s/---/--/g; #replace of hyphens
(my $cat_name_e = $cat->{cat_name}) =~s/--/-/g; #replace of hyphens
Txs
FMP
I am a kind of newsbie in perl and in regex
I would like to applys many regex to (my $cat_name_e = $cat->{cat_name})
So here is what I did : regex are good (I guess) but it is to way I did apply these regex to (my $cat_name_e = $cat->{cat_name}) that is wrong...
(my $cat_name_e = $cat->{cat_name}) =~s/[éèê]/e/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/[àâ]/a/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/ô/o/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/î/i/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/ç/c/g; #replace accent
(my $cat_name_e = $cat->{cat_name}) =~s/\W/-/g; #replace all non alphanumerics by hyphens
(my $cat_name_e = $cat->{cat_name}) =~s/---/--/g; #replace of hyphens
(my $cat_name_e = $cat->{cat_name}) =~s/--/-/g; #replace of hyphens
Txs
FMP