Ask Documentation
WebsiteGitHubPyPI
  • Introduction
  • Getting Started
    • Install & Get Started
    • Hello, World!
  • Routes & Requests
    • Routes
    • Defining Routes
    • Request Data
    • HTTP Status Codes & Methods
    • CORS
  • Response
    • JSON Response
    • JSON Response With an HTTP Status Code
  • Classes
    • Class Instance Variable
    • Initialization/Constructor Method
  • Data Types
    • Dictionaries
  • Built-in Utilities
    • Quick_set()
    • Deep()
    • Serialize()
    • Require_keys()
    • Random Generators
    • Pattern Matching
    • Email
  • Database
    • Ask and Databases
    • Models/Classes
      • Columns
      • Initialization/Constructor
      • Serialization
      • The &basic decorator
    • CRUD
      • Add
      • Select
      • Update
      • Delete
    • Check if a Row Exists
    • Sorting
    • Database Lists
  • JWT Authentication
    • Introduction
    • Protecting Routes
    • How to Create a Basic Login System
    • Properties & Methods of _auth
    • Making Requests to Protected Routes
  • Decorators
    • What are Decorators?
    • Create and Use Custom Decorators
    • Built-in Decorators
  • Security
    • Hashing
    • Route Security
    • Environment Variables
  • Configuring the Transpiler
  • Askfile.toml
  • Modules & Libraries
    • Importing an Ask Module
    • Includes
    • Importing Python Modules
  • Development Tools
    • Editor Syntax Highlighting
    • Automatic API documentation
    • CLI Flags
    • Running in development mode
    • Versioning System
  • Contribute
    • Feature Requests
    • Bug Reports
    • Contribute Code
Powered by GitBook
On this page
  • Using Regex
  • Using Abnex
Export as PDF
  1. Built-in Utilities

Pattern Matching

Regular Expressions & Abnormal Expressions

PreviousRandom GeneratorsNextEmail

Last updated 4 years ago

You can use pattern/text matching in two different ways. Ask also supports pythons raw strings, which is the prefered way to write patterns.

Using Regex

Use Python's own built-in re library for regexes.

Using Abnex

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.

here