querymatch

package module
v0.0.0-...-7fe262f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(m, s string) ([]string, error)

data una stringa m del tipo: "ciao (.*)!" e una stringa s del tipo "ciao mirko!", Match ritornerà ["mirko"], nil. TIENE CACHE DEI REGEXP COMPILATI!

COME LEGGGERE L'ARRAY RITORNATO:

  • IL PRIMO elemento è sempre la stringa "s" (el. 0)
  • DAL SECONDO IN POI ci sono le stringhe che hanno combaciato i punti con "(.*)" o altri jolly regexp (el. 1>)

func PreparaRegexp

func PreparaRegexp(m string, salvaCache bool) (*regexp.Regexp, error)

data una stringa m, la compila regexp e ne ritorna l'oggetto pronto. In caso di errore, ritorna nil & un errore in 2° valore

PARAMETRI: @param m: stringa da compilare regexp @param salvaCache: 'true' se vuoi che la salviamo nella nostra cache interna, cacheRegexp, per uso futuro

Types

This section is empty.