Mastering Regular Expressions
Listings from page 67
Download all listings shown below.
Chapter 2; page 67 (download)
$text =~ s/(\d)(?=(\d\d\d)+(?!\d))/$1,/g; |
Chapter 2; page 67 (download)
$text =~ s/(\d)((\d\d\d)+\b)/$1,$2/g; |
Chapter 2; page 67 (download)
undef $/; # Enter "file-slurp" mode. $text = <>; # Slurp up the first file given on the command line. |
Fetch additional Second-Edition listings and data: