1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Documentation Doc error for @BETWEEN

Discussion in 'Plugins' started by dcantor, Feb 23, 2017.

  1. dcantor

    Joined:
    May 29, 2008
    Messages:
    507
    Likes Received:
    3
    Charles Dye,
    Code:
    @BETWEEN — Returns the portion of a string between two delimiters. 
    ...
    (Exception: If you want to use a close bracket as a delimiter, escape it.) 
    
    Nope, close brackets prove not to be exceptional for this plugin.

    Code:
    C:\> echo %@between[[^],[6] This is line 6 of some file.]
    TextUtils plugin: Missing comma
    
    C:\> echo %@between[[],[6] This is line 6 of some file.]
    6
    
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,286
    Likes Received:
    39
    It should probably say "mismatched close bracket".
     
  3. dcantor

    Joined:
    May 29, 2008
    Messages:
    507
    Likes Received:
    3
    Or UNMATCHED close bracket.

    OTOH, these also don't work:
    Code:
    > echo %@between[a^],[a6] This is line 6 of some file.]
    TextUtils plugin: Missing comma
    
    > echo %@between[a],[a6] This is line 6 of some file.]
    TextUtils plugin: Missing argument
    
    
     
  4. dcantor

    Joined:
    May 29, 2008
    Messages:
    507
    Likes Received:
    3
    For what it's worth my intended usage is:
    Code:
    set linenum=%@between[[],%@execstr[*ffind /k /m /l /t"some text"  somefile.txt]]
     

Share This Page