#ifndef __REG_STRING_H__ #define __REG_STRING_H__ /* * @author fenrir (https://fenrir.naruoka.org/) * * reg_string.h * 正規表現の特殊記法について記述したヘッダ。 */ #define MATCH 0 #ifdef __cplusplus extern "C"{ #endif int reg_compare(char *regexp, char *target); int reg_backref_index(char *target); /* 正規表現特殊文字 */ #define REGEXP_OR '|' #define GROUP_START '(' #define GROUP_END ')' #define GROUP_WITHOUT_MARK '?' #define CHAR_CLASS_START '[' #define CHAR_CLASS_END ']' #define CHAR_CLASS_INVERT '^' #define CHAR_CLASS_RANGE '-' #define ZERO_OR_ONE '?' #define ZERO_TO_ANY '*' #define ONE_TO_ANY '+' #define MIN_MAX_START '{' #define MIN_MAX_END '}' #define MIN_MAX_SEPARATOR ',' #define NON_GREEDY '?' #define ESCAPE_CHARACTER '\\' #define ANY_CHARACTER '.' #define SPACE 's' #define NOT_SPACE 'S' #define DIGIT 'd' #define NOT_DIGIT 'D' #define HEX 'h' #define NOT_HEX 'H' #define NORMAL_CHAR 'w' #define NOT_NORMAL_CHAR 'W' #ifdef __cplusplus }; #endif #endif /* __REG_STRING_H__ */