3 ms·
Hello, what would be a better way to do it? In code? Regex?
by who-shot-jr 5y ago
Hello, what would be a better way to do it? In code? Regex?
- Hippocrates 5y agoProbably yes, in code with regex. To name a few advantages: 1. Better readability and organization. Rules and word lists can be abstracted to more of a config format. 2. possible to easily store in a database and support dynamic additions/changes to the rules and words 3. Better accountability of performance. Able to use profiling to catch any perf issues in the rules. 4. Testable with unit tests