SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Jul 2003
    Location
    australia
    Posts
    37
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Can you Use NOT or OR in a regular Expression

    I am unsure of the syntax of AND in Winrunner regular Expressions.

    My problem is I have a pop up menu that contains a text link: New Folder. The menu pops up from a directory type window. If there is an item called "New Folder" in the directory then it is also a text link: New Folder. I wanted to specify the menu item New Folder to NOT have a html_url of javascript.GetContent()

  2. #2
    Member
    Join Date
    Jul 2002
    Location
    Sheffield, Yorkshire England
    Posts
    88
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Can you Use NOT or OR in a regular Expression

    syntax for AND
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">if((a==4) &amp;&amp; (b==4))
    {
    do stuff
    }</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

  3. #3
    Senior Member
    Join Date
    May 2001
    Location
    Ankh-Morpork
    Posts
    2,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Can you Use NOT or OR in a regular Expression

    WR regexps do not support comparison operators as does Perl, for instance. You might be able to accomplish your goal with multiple match() statements within a comparison:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">if(match(someString, &quot;some regexp&quot &gt; 0 &amp;&amp;
    match(someString, &quot;another regexp) == 0)
    {
    # do this stuff if found &quot;some regexp&quot; in someString
    # but did not find &quot;another regexp&quot; in someString
    }</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
    web site | [url=http://www.ebookworm.us/[/url]

    [i]...Sound trumpets! Every trumpet in the host! / Sixty thousand, on these words, sound, so high the mountains sound, and the valleys resound.&lt;/i] (The Song of Roland)

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 03:49 AM.

Copyright BetaSoft Inc.