home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,446 of 2,753   
   Hans-Peter Diettrich to All   
   Re: Regular expression string searching    
   13 Mar 18 10:53:05   
   
   From: DrDiettrich1@netscape.net   
      
   Am 11.03.2018 um 21:52 schrieb Ben Hanson:   
   >> /This/ actually worked for me (one character change):   
   >>   
   >> [/][*]([^*]|[*]+[^/])*[*]+[/]   
   >   
   > Your modified regex produces the following state machine:   
   >   
   > State: 0   
   >    [/] -> 1   
   >   
   > State: 1   
   >    [*] -> 2   
   >   
   > State: 2   
   >    [^*] -> 2   
   >    [*] -> 3   
      
   I'm just curious about the notation.   
   What happens if neither pattern matches?   
   What's the purpose of [^*] in state 2, as opposed to state 1?   
      
   DoDi   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca