#!/usr/bin/perl -wl use strict; my $foo="xoxoxoxoxoxoxoxoxoxoxoxoxoxoxox"; $foo =~ s/^(.)(.*)(.)$/\U$1\E$2\U$3/; print "$foo\n"; #Output: XoxoxoxoxoxoxoxoxoxoxoxoxoxoxoX my $bar="xoXOxoXOxoXOxoXOxoXOxoXOxo"; $bar =~ s/^(.)(.*)(.)$/\U$1\E$2\U$3/; print "$bar\n"; #Ooutput: XoXOxoXOxoXOxoXOxoXOxoXOxO
In reply to Re: Re: help with a regexp
by Helter
in thread help with a regexp
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |