Post Reply 
$TSTing positional vars
Oct. 21, 2010, 02:19 AM
Post: #5
RE: $TSTing positional vars
Testing against

Code:
<title>google</title>

Code:
[Patterns]
Name = "A -- incorrect: \0 is empty, $TST(\0=*) should not match"
Active = FALSE
Bounds = "<title*</title>"
Limit = 256
Match = "*o\0o*"
        "&$TST(\0=*)"

Name = "B -- correct: \0 is empty, $TST(\0=*) does not match with workaround"
Active = FALSE
Bounds = "<title*</title>"
Limit = 256
Match = "*o(|\0)o*"
        "&$TST(\0=*)"

Test filter "A". This filter should not match but does!
Test should fail because \0 should have no value.

Test filter "B". Test should fail because \0 should have no value and does fail.
The left side of "(|\0)" matches 'nothing' and keeps \0 empty.

Is there a better workaround?



Of interest, the test window results aren't always the same as the real world.

Code:
[Patterns]
Name = "C -- incorrect: \0 is empty, $TST(\0=*) should not match"
Active = TRUE
Bounds = "<title*</title>"
Limit = 256
Match = "*o\0o*"
        "&$TST(\0=\1)"
Replace = "\\0 is \0\r\n"
          "\\1 is \1\r\n"
          "\\1 is \1\r\n"

Test window shows

Code:
\0 is
\1 is ogle</title>
\1 is ogle</title>

Actual page shows

Code:
<Match: C -- incorrect: \0 is empty, $TST(\0=*) should not match >
<title>Google</title>
</Match>
\0 is
\1 is ogle</title>
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
$TSTing positional vars - whenever - Feb. 04, 2009, 11:10 AM
RE: $TSTing positional vars - sidki3003 - Feb. 04, 2009, 02:18 PM
RE: $TSTing positional vars - whenever - Feb. 05, 2009, 05:06 AM
RE: $TSTing positional vars - sidki3003 - Feb. 05, 2009, 01:43 PM
RE: $TSTing positional vars - JJoe - Oct. 21, 2010 02:19 AM
RE: $TSTing positional vars - sidki3003 - Oct. 21, 2010, 03:13 PM
RE: $TSTing positional vars - JJoe - Oct. 21, 2010, 06:03 PM
RE: $TSTing positional vars - sidki3003 - Oct. 21, 2010, 06:45 PM
RE: $TSTing positional vars - JJoe - Oct. 21, 2010, 09:29 PM
RE: $TSTing positional vars - sidki3003 - Oct. 22, 2010, 10:12 PM
RE: $TSTing positional vars - JJoe - Oct. 22, 2010, 11:40 PM
RE: $TSTing positional vars - whenever - Oct. 10, 2011, 03:51 AM

Forum Jump: