13o-bbr-bbq / machine_learning_security

Source code about machine learning and security.
1.96k stars 645 forks source link

Tidy regular expression matching for different versions #40

Open iBM88 opened 5 years ago

iBM88 commented 5 years ago

When using Tidy for HTML matching check, the regular expression to get the count of warnings and errors might not work with all Tidy versions. Therefore I had to switch from: str_pattern = r'.*Tidy found ([0-9]+) warnings and ([0-9]+) errors.*$' to: str_pattern = r'.*([0-9]+) warnings, ([0-9]+) error were found!.*$'

13o-bbr-bbq commented 5 years ago

Thank you for your advice! I'll improve the regex.