The tutor tells the workings of yesterday’s pattern matching example. In yesterday’s post I mention that the regular expression if ($input=~/item1[^0-9]*[0-9]*.?[0-9]{0,2}/i) can find the pattern item1….$#####.## in a longer string. Here are some explanatory points: =~ is the pattern find …

Perl: regular expressions: yesterday’s code explained Read more »

Tagged with: , , ,

The tutor demonstrates a Perl regular expression that finds an item name and its price in a string. Suppose you believe that the price of item1 is given in a string, but aren’t sure how exactly it’s said. It could, …

Perl: using regex (aka regular expression, pattern matching) to find an item and its price in a string Read more »

Tagged with: , , ,

The tutor shows off some of Perl’s pattern matching (aka regex) talents. Let’s imagine you have a laptop you share with a friend for project work. They’re not million-dollar secrets you’re keeping, but on the other hand, you don’t want …

Perl: a password (sort of) using regular expression (regex) power Read more »

Tagged with: , , ,