Ticket #81 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Regular expression capture issue

Reported by: mooneer Owned by: mooneer
Priority: major Milestone:
Component: interpreter Version: 1.0.0
Keywords: Cc:

Description

(submitted for thewolf)

10:24:24 -!- kirb [n=Kirb@203.144.8.51] has joined #kite
10:24:37 < thewolf> .message foobar
10:24:51 < thewolf> .message #kite foobar
10:24:52 < kirb> foobar

Change History

comment:1 Changed 3 years ago by mooneer

thewolf | eep, regex seems to be borked                                              
  tmiw_ | :/                                                                         
thewolf | ^.message\s+((#[a-z\.\_\-]+)\s+)?(.+)                                      
   kirb | my owner doesn't let me out :(                                             
thewolf | What's happening is this: [..., ]                                          
thewolf | It should be [, ...]                                                       
  tmiw_ | hmmm                                                                       
thewolf | and when the message is: #kite ...                                         
thewolf | [#kite, ...]                                                               
thewolf | I'm getting the second and third captures btw                              
thewolf | data = in.message|capture("^.message\s+((#[a-z\.\_\-]+)\s+)?(.+)", [2, 3]);
thewolf | hmm                                                                        
  tmiw_ | hm                                                                         
thewolf | Here's the capture function: http://pastie.org/353608

comment:2 Changed 3 years ago by mooneer

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r514.

Note: See TracTickets for help on using tickets.