[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qftestJUI] Problem checking multi-line text with regular expression
I would like to test a HTML document to contain nothing but an empty paragraph in its body. Therefore I started experimenting with a regular _expression_ as I don't want the test to break everytime when changes appear in e. g. the head. But I cannot get the regular _expression_ to run. Although I already found a hint by Bastian Bowe (25.7.2005) that newlines are not supported and you should use the workaround (.|\n)* my suggested regular expressions still doesn't work.
Here is the original source to check against (just the part between the body-tags):
This regular _expression_ works (but does not test the thing I would like to test):
The next step forward already does not work anymore:
And of course the final _expression_ I would like does not work, too:
(.|\n)*\<body\>( |\n|\t)*\<p\>( |\n|\t)*\<\/p\>( |\n|\t)*\<\/body\>(.|\n)*
(.|\n)*\<body\>[ \n\t]*\<p\>[ \n\t]*\<\/p\>[ \n\t]*\<\/body\>(.|\n)*
Any hints are welcome (before I start to write a SUT Script)...