SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Dec 2001
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    matchstr behaviour



    matchstr ( "***", "" )

    returns true

    why ?

    ------------------

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: matchstr behaviour

    Because the 4Test reference says so for MatchStr.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    An asterick matches any string of zero or more characters.
    <HR></BLOCKQUOTE>

    "" == 0 characters.

    ------------------
    Steven Tyler
    Lead SQA Automation Engineer
    Timekeeper Central Group
    Kronos Incorporated
    E-Mail: styler@kronos.com
    www.kronos.com
    Improving the Performance of People and Business™
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  3. #3
    Junior Member
    Join Date
    Dec 2001
    Posts
    23
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: matchstr behaviour


    Hi Steven,
    In fact in this case matchstr () is returning
    false and this is what I am trying to
    understand. I had posted a correction
    for this post- but it looks like it has
    disappeared

    so the Question is
    matchstr ( "***" , "" ) returns false

    why ?

    ------------------

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: matchstr behaviour

    I should have tested it before replying...

    I see your point, it looks like a SilkTest inconsistency.

    MatchStr("***","") returns FALSE // inconsistent

    MatchStr("***","d") returns TRUE

    MatchStr("*","d") returns TRUE

    MatchStr("*","") returns TRUE


    ------------------
    Steven Tyler
    Lead SQA Automation Engineer
    Timekeeper Central Group
    Kronos Incorporated
    E-Mail: styler@kronos.com www.kronos.com
    Improving the Performance of People and Business™

    [This message has been edited by styler (edited 01-21-2002).]
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: matchstr behaviour

    If you put "" as " " with a space it will work.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:55 PM.

Copyright BetaSoft Inc.