Help for this page

Select Code to Download


  1. or download this
    Variable length lookbehind not implemented in regex...
    
  2. or download this
    my $pattern = "(?<!ss)abc";      # 'ss' in lookbehind
    qr/$pattern/i;              # throws the error
    ...
    
    my $pattern =  "(?<!s[st])abc";    # 's[st]' in lookbehind
    qr/$pattern/i;                  # this works, whereas these fail: (?<!
    +s[s]),(?<!s[t])