in reply to regex to get random quote
Nevertheless, a regex might be later used to filter only the paragraphs starting with a number and a dot. Proof of concept using XML::XSH2:
open :r :F html http://motivationgrid.com/50-inspirational-quotes-to-l +ive-by/ ; for //p[xsh:match(., '^[0-9]+\.')] echo (.) | shuf | head -n1 ;
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex to get random quote
by Aldebaran (Curate) on May 16, 2016 at 06:53 UTC | |
by Athanasius (Archbishop) on May 16, 2016 at 07:32 UTC | |
by Aldebaran (Curate) on May 17, 2016 at 08:02 UTC | |
by Athanasius (Archbishop) on May 17, 2016 at 12:34 UTC | |
by Aldebaran (Curate) on May 21, 2016 at 06:59 UTC | |
| |
by choroba (Cardinal) on May 16, 2016 at 07:46 UTC |