• Check out world news on HeadLinesList.com
  • Forum registration is now open for public.
Hello There, Guest! Login


Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Perl regex statement?
#
I need help creating a regex statement that Capitalize the first letter of all words ending in "day". For example monday becomes Monday.

This is what I have

m/

Ads

#
$words =~ s/(\w+day)/\u\L$1/g;

maybe something like this just according to what you're doing

$words =~ s/(\s*\w+day\s*)/\u\L$1/g;

Ads

  


Forum Jump:


1 Guest(s)