Commits

Shlomi Fish committed c3b11e4

Add the .* fortune.

  • Participants
  • Parent commits 10a4915

Comments (0)

Files changed (3)

t2/humour/fortunes/fortunes-shlomif-ids-data.yaml

       date: 2012-05-03T19:39:54Z
     sharp-perl-dishsort: 
       date: 2009-12-14T16:42:47Z
+    sharp-perl-dot-star: 
+      date: 2012-12-14T17:39:16Z
     sharp-perl-eviloverlords: 
       date: 2011-01-06T15:32:00Z
     sharp-perl-eye-pea: 

t2/humour/fortunes/sharp-perl.xml

             </info>
         </irc>
     </fortune>
+    <fortune id="sharp-perl-dot-star">
+        <meta>
+            <title>Dot Star</title>
+        </meta>
+        <irc>
+            <body>
+<saying who="theseb">i have a regex that finds stuff in parentheses... &quot;\(.*\)&quot; ...how make it NOT be &quot;greedy&quot;?</saying>
+<saying who="theseb">i.e. if it sees &quot;(aaa)bbb)&quot; I want it to grab (aaa) instead of the entire string</saying>
+<saying who="theseb">(aaa)bbb)</saying>
+<saying who="Kyshtynbai">/\ba\b|(\b.*a[^b]+\b)/ &lt;-- this works for my proble, at least at that tests that i run for it. Regexp&#39; theme is really an effort as it seems to me...</saying>
+<saying who="Su-Shee">theseb: you know there is a module to matched paired things like parentheses.. Text::Balanced?</saying>
+<saying who="Su-Shee">theseb: extract_bracketed</saying>
+<saying who="DrForr">Text::Balanced, yes. Doing ab-type balanced strings in REs is a pain.</saying>
+<saying who="theseb">Su-Shee: thanks...i actually have the same problem with brackets []</saying>
+<saying who="Su-Shee">theseb: extract_bracketed ;)</saying>
+<saying who="LeoNerd">Or Parser::MGC :)</saying>
+<saying who="Su-Shee">theseb: also, .* is the most unspecific regex you can use, it&#39;s like saying oh well match something of anything or nothing and please, a lot of it ;)</saying>
+            </body>
+            <info>
+                <channel>#perl</channel>
+                <network>Freenode</network>
+                <tagline>.* described</tagline>
+            </info>
+        </irc>
+    </fortune>
 </list>
 </collection>

t2/humour/fortunes/ver.txt

-0.18.40
+0.18.41