Pattern Matching
Regular Expressions & Abnormal Expressions
Last updated
Regular Expressions & Abnormal Expressions
Last updated
You can use pattern/text matching in two different ways. Ask also supports pythons raw strings, which is the prefered way to write patterns.
Use Python's own built-in re
library for regexes.
Abnex or Abnormal Expressions is an alternative to regular expressions. It's goal is to make it easier to read and write patterns. Not only does it allow for e.g. spaces inside the pattern and less forward slashes, but it also uses characters that might be considered to be more "logical" e.g. not is represented by an exclamation point !
, groups with curly brackets { }
, and so on.
Read more about Abnex .
Call Abnex's different functions on the pre-imported ab
object.