The re Reference Manual

This is the re Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 17:44:41 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 re

Lua-style string pattern matching.

Author

Jeffrey Massung

License

Apache 2.0

Version

1.0

Dependency

parse (system).

Source

re.asd.

Child Component

re.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 re/re.asd

Source

re.asd.

Parent Component

re (system).

ASDF Systems

re.

Packages

re-asd.


3.1.2 re/re.lisp

Source

re.asd.

Parent Component

re (system).

Packages

re.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 re

Source

re.lisp.

Use List
  • common-lisp.
  • parse.
Public Interface
Internals

4.2 re-asd

Source

re.asd.

Use List
  • asdf/interface.
  • common-lisp.

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-re ((re pattern) &body body)

Compile pattern if it’s not a RE object and execute body.

Package

re.

Source

re.lisp.

Macro: with-re-match ((match match-expr &key no-match) &body body)

Intern match symbols to execute a body.

Package

re.

Source

re.lisp.


5.1.2 Ordinary functions

Function: compile-re (pattern)

Create a regular expression from a pattern string.

Package

re.

Source

re.lisp.

Function: find-re (pattern s &key all start end)

Find a regexp pattern match somewhere in a string.

Package

re.

Source

re.lisp.

Function: match-re (pattern s &key exact start end)

Test a pattern re against a string.

Package

re.

Source

re.lisp.

Function: replace-re (pattern with s &key all start end)

Replace patterns found within a string with a new value.

Package

re.

Source

re.lisp.

Function: split-re (pattern s &key all coalesce-seps start end)

Split a string into one or more strings by pattern match.

Package

re.

Source

re.lisp.


5.1.3 Generic functions

Generic Reader: match-groups (object)
Package

re.

Methods
Reader Method: match-groups ((re-match re-match))

automatically generated reader method

Source

re.lisp.

Target Slot

groups.

Generic Reader: match-pos-end (object)
Package

re.

Methods
Reader Method: match-pos-end ((re-match re-match))

automatically generated reader method

Source

re.lisp.

Target Slot

end-pos.

Generic Reader: match-pos-start (object)
Package

re.

Methods
Reader Method: match-pos-start ((re-match re-match))

automatically generated reader method

Source

re.lisp.

Target Slot

start-pos.

Generic Reader: match-string (object)
Package

re.

Methods
Reader Method: match-string ((re-match re-match))

automatically generated reader method

Source

re.lisp.

Target Slot

match.


5.1.4 Standalone methods

Method: make-load-form ((re re) &optional env)

Tell the system how to save and load a regular expression to a FASL.

Source

re.lisp.

Method: print-object ((re re) s)

Output a regular expression to a stream.

Source

re.lisp.

Method: print-object ((match re-match) s)

Output a regular expression match to a stream.

Source

re.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: copy-re-thread (instance)
Package

re.

Source

re.lisp.

Function: escape (stream)

Return the test and predicate for an escaped character.

Package

re.

Source

re.lisp.

Function: hex-char-p (c)

T if c is a hexadecimal character.

Package

re.

Source

re.lisp.

Function: is-not (pred)

Create a predicate that tests the inverse.

Package

re.

Source

re.lisp.

Function: make-re-thread (pc sp groups stack)
Package

re.

Source

re.lisp.

Function: match (s thread start offset)

Create a re-match from a thread that matched.

Package

re.

Source

re.lisp.

Function: newline-p (c)

T if c is a newline character.

Package

re.

Source

re.lisp.

Function: parse-re (pattern)

Parse a regular expression pattern.

Package

re.

Source

re.lisp.

Function: punctuation-p (c)

T if c is a punctuation character.

Package

re.

Source

re.lisp.

Function: re-boundary (g0)

The start or end of a string.

Package

re.

Source

re.lisp.

Function: re-bounds (g0)

Lua-style %b bounds.

Package

re.

Source

re.lisp.

Function: re-char (g0)

Match any character, exact character, or predicate function.

Package

re.

Source

re.lisp.

Function: re-expr (g0)

A single character, set, or loop of expressions.

Package

re.

Source

re.lisp.

Function: re-group (g0)

Match an optionally captured group.

Package

re.

Source

re.lisp.

Function: re-parser (g0)

A regular expression is one or more expressions.

Package

re.

Source

re.lisp.

Function: re-set (g0)

Match from a set of characters.

Package

re.

Source

re.lisp.

Function: re-set-char (g0)

Valid characters in a character set.

Package

re.

Source

re.lisp.

Function: re-set-chars (g0)

Characters, character ranges, and named character sets.

Package

re.

Source

re.lisp.

Reader: re-thread-groups (instance)
Writer: (setf re-thread-groups) (instance)
Package

re.

Source

re.lisp.

Target Slot

groups.

Function: re-thread-p (object)
Package

re.

Source

re.lisp.

Reader: re-thread-pc (instance)
Writer: (setf re-thread-pc) (instance)
Package

re.

Source

re.lisp.

Target Slot

pc.

Reader: re-thread-sp (instance)
Writer: (setf re-thread-sp) (instance)
Package

re.

Source

re.lisp.

Target Slot

sp.

Reader: re-thread-stack (instance)
Writer: (setf re-thread-stack) (instance)
Package

re.

Source

re.lisp.

Target Slot

stack.

Function: return-p (c)

T if c is a return character.

Package

re.

Source

re.lisp.

Function: run (re s start end)

Execute a regular expression program.

Package

re.

Source

re.lisp.

Function: space-p (c)

T if c is a whitespace character.

Package

re.

Source

re.lisp.

Function: tab-p (c)

T if c is a tab character.

Package

re.

Source

re.lisp.

Function: word-char-p (c)

T if is alphanumeric or an underscore.

Package

re.

Source

re.lisp.


5.2.2 Generic functions

Generic Reader: re-expression (object)
Package

re.

Methods
Reader Method: re-expression ((re re))

automatically generated reader method

Source

re.lisp.

Target Slot

expr.

Generic Reader: re-pattern (object)
Package

re.

Methods
Reader Method: re-pattern ((re re))

automatically generated reader method

Source

re.lisp.

Target Slot

pattern.


5.2.3 Structures

Structure: re-thread
Package

re.

Source

re.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: pc
Readers

re-thread-pc.

Writers

(setf re-thread-pc).

Slot: sp
Readers

re-thread-sp.

Writers

(setf re-thread-sp).

Slot: groups
Readers

re-thread-groups.

Writers

(setf re-thread-groups).

Slot: stack
Readers

re-thread-stack.

Writers

(setf re-thread-stack).


5.2.4 Classes

Class: re

Regular expression.

Package

re.

Source

re.lisp.

Direct methods
Direct slots
Slot: pattern
Initargs

:pattern

Readers

re-pattern.

Writers

This slot is read-only.

Slot: expr
Initargs

:expression

Readers

re-expression.

Writers

This slot is read-only.

Class: re-match

Matched pattern.

Package

re.

Source

re.lisp.

Direct methods
Direct slots
Slot: match
Initargs

:match

Readers

match-string.

Writers

This slot is read-only.

Slot: groups
Initargs

:groups

Readers

match-groups.

Writers

This slot is read-only.

Slot: start-pos
Initargs

:start-pos

Readers

match-pos-start.

Writers

This slot is read-only.

Slot: end-pos
Initargs

:end-pos

Readers

match-pos-end.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   E   F   G   H   I   M   N   P   R   S   T   W  
Index Entry  Section

(
(setf re-thread-groups): Private ordinary functions
(setf re-thread-pc): Private ordinary functions
(setf re-thread-sp): Private ordinary functions
(setf re-thread-stack): Private ordinary functions

C
compile-re: Public ordinary functions
copy-re-thread: Private ordinary functions

E
escape: Private ordinary functions

F
find-re: Public ordinary functions
Function, (setf re-thread-groups): Private ordinary functions
Function, (setf re-thread-pc): Private ordinary functions
Function, (setf re-thread-sp): Private ordinary functions
Function, (setf re-thread-stack): Private ordinary functions
Function, compile-re: Public ordinary functions
Function, copy-re-thread: Private ordinary functions
Function, escape: Private ordinary functions
Function, find-re: Public ordinary functions
Function, hex-char-p: Private ordinary functions
Function, is-not: Private ordinary functions
Function, make-re-thread: Private ordinary functions
Function, match: Private ordinary functions
Function, match-re: Public ordinary functions
Function, newline-p: Private ordinary functions
Function, parse-re: Private ordinary functions
Function, punctuation-p: Private ordinary functions
Function, re-boundary: Private ordinary functions
Function, re-bounds: Private ordinary functions
Function, re-char: Private ordinary functions
Function, re-expr: Private ordinary functions
Function, re-group: Private ordinary functions
Function, re-parser: Private ordinary functions
Function, re-set: Private ordinary functions
Function, re-set-char: Private ordinary functions
Function, re-set-chars: Private ordinary functions
Function, re-thread-groups: Private ordinary functions
Function, re-thread-p: Private ordinary functions
Function, re-thread-pc: Private ordinary functions
Function, re-thread-sp: Private ordinary functions
Function, re-thread-stack: Private ordinary functions
Function, replace-re: Public ordinary functions
Function, return-p: Private ordinary functions
Function, run: Private ordinary functions
Function, space-p: Private ordinary functions
Function, split-re: Public ordinary functions
Function, tab-p: Private ordinary functions
Function, word-char-p: Private ordinary functions

G
Generic Function, match-groups: Public generic functions
Generic Function, match-pos-end: Public generic functions
Generic Function, match-pos-start: Public generic functions
Generic Function, match-string: Public generic functions
Generic Function, re-expression: Private generic functions
Generic Function, re-pattern: Private generic functions

H
hex-char-p: Private ordinary functions

I
is-not: Private ordinary functions

M
Macro, with-re: Public macros
Macro, with-re-match: Public macros
make-load-form: Public standalone methods
make-re-thread: Private ordinary functions
match: Private ordinary functions
match-groups: Public generic functions
match-groups: Public generic functions
match-pos-end: Public generic functions
match-pos-end: Public generic functions
match-pos-start: Public generic functions
match-pos-start: Public generic functions
match-re: Public ordinary functions
match-string: Public generic functions
match-string: Public generic functions
Method, make-load-form: Public standalone methods
Method, match-groups: Public generic functions
Method, match-pos-end: Public generic functions
Method, match-pos-start: Public generic functions
Method, match-string: Public generic functions
Method, print-object: Public standalone methods
Method, print-object: Public standalone methods
Method, re-expression: Private generic functions
Method, re-pattern: Private generic functions

N
newline-p: Private ordinary functions

P
parse-re: Private ordinary functions
print-object: Public standalone methods
print-object: Public standalone methods
punctuation-p: Private ordinary functions

R
re-boundary: Private ordinary functions
re-bounds: Private ordinary functions
re-char: Private ordinary functions
re-expr: Private ordinary functions
re-expression: Private generic functions
re-expression: Private generic functions
re-group: Private ordinary functions
re-parser: Private ordinary functions
re-pattern: Private generic functions
re-pattern: Private generic functions
re-set: Private ordinary functions
re-set-char: Private ordinary functions
re-set-chars: Private ordinary functions
re-thread-groups: Private ordinary functions
re-thread-p: Private ordinary functions
re-thread-pc: Private ordinary functions
re-thread-sp: Private ordinary functions
re-thread-stack: Private ordinary functions
replace-re: Public ordinary functions
return-p: Private ordinary functions
run: Private ordinary functions

S
space-p: Private ordinary functions
split-re: Public ordinary functions

T
tab-p: Private ordinary functions

W
with-re: Public macros
with-re-match: Public macros
word-char-p: Private ordinary functions