in reply to Finding lowercase letters next to uppercase letters
${1}::${2} is a pretty good way to disambiguate, I guess, but \:\: is 2 characters less (in case you ever wanna golf)$new_type = "BookInstructional MaterialTeaching Guide"; $new_type =~ s/([a-z])([A-Z])/$1\:\:$2/g; # $1\:\:$2/g; ##\\\\\\ print "$new_type\n";
You could even say
$new_type =~ s/([a-z])([A-Z])/"$1::$2"/g; #"$1::$2" - strings are a monks best friend
Please be patient with me. I am new to Perl and am used to working with PHP, so regexs are pretty foreign to me.
So what you're saying is you need to try harder (at least that's what you're *supposed* to do ;D - I know i know, whatever....)
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"
|
|---|