James's Blog
Sunday, December 04, 2005
Perl: difference between + and *
+ means 1 or more occurences
* means 0 or more occurences
for examples:
$str = "good food";
($str1 = $str) =~ s/o*/e;
($str2 = $str) =~ s/o+/e;
result is:
$str1: egood food
$str2: ged food
posted by James Pei @
4:52 PM
0 Comments:
Post a Comment
<< Home
Previous Posts
Perl: transaction across databases
Quick Sort
Oracle: Choosing Index Keys
Oracle: Flashback Query in 10g
Oracle: Links
Oracle: Flashback
Oracle: Using Loop and Random
Oracle: Histograms
Oracle: Generation statistics
Oracle: Statistics
0 Comments:
Post a Comment
<< Home