Hi, I am totally new to Python and I am making a script that parses a file.
I try to find a regular expression in the file with: expr.match(line), and that works just fine.
The problem is that I don't want to print this line that has the regular expression, so in Java I would do:
if(!expr.match(line))
{
...
// print the other lines
...
}
How can I do this in Python?
Thanks,
Komyg
I try to find a regular expression in the file with: expr.match(line), and that works just fine.
The problem is that I don't want to print this line that has the regular expression, so in Java I would do:
if(!expr.match(line))
{
...
// print the other lines
...
}
How can I do this in Python?
Thanks,
Komyg