aboutsummaryrefslogtreecommitdiff
path: root/src/filter/regexp.h
blob: 32ba5c384a0f6e7312dc07dc03d14f32dd52f8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * This file is part of smolbote. It's copyrighted by the contributors recorded
 * in the version control history of the file, available from its original
 * location: git://neueland.iserlohn-fortress.net/smolbote.git
 * 
 * SPDX-License-Identifier: GPL-3.0
 */

#ifndef REGEXP_H
#define REGEXP_H

#include <QRegularExpression>

/*!
 * Regular Expression class for AdBlockPlus filters
 */
class RegExp : public QRegularExpression
{
public:
    explicit RegExp(const QString &pattern = "", PatternOptions options = NoPatternOption);

    bool hasMatch(const QString &subject, int offset=0, MatchType matchType=NormalMatch, MatchOptions matchOptions=NoMatchOption) const;
    void setWildcardPattern(const QString &pattern);
};

#endif // REGEXP_H