Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BurntSushi/regexp
/ functions
Functions
182 in github.com/BurntSushi/regexp
⨍
Functions
182
◇
Types & classes
36
↓ 64 callers
Method
len
(&self)
src/re.rs:726
↓ 37 callers
Method
push
(&mut self, ast: ~Ast)
src/parse.rs:304
↓ 33 callers
Method
err
(&self, msg: &str)
src/parse.rs:890
↓ 29 callers
Method
iter
Creates an iterator of all the capture groups in order of appearance in the regular expression.
src/re.rs:684
↓ 25 callers
Method
unwrap
(self)
src/parse.rs:155
↓ 15 callers
Method
slice
(&self, start: uint, end: uint)
src/parse.rs:912
↓ 13 callers
Method
peek_is
(&self, offset: uint, is: char)
src/parse.rs:904
↓ 13 callers
Method
push
(&mut self, x: Inst)
src/compile.rs:229
↓ 12 callers
Method
is_match
Returns true if and only if the regex matches the string given. # Example Test if some text contains at least one word with exactly 13 characters:
src/re.rs:168
↓ 10 callers
Method
clone
(&self)
src/re.rs:130
↓ 10 callers
Method
expect
(&mut self, expected: char)
src/parse.rs:283
↓ 9 callers
Method
cur
(&self)
src/parse.rs:908
↓ 8 callers
Method
noteof
(&mut self, expected: &str)
src/parse.rs:276
↓ 7 callers
Method
replace_all
Replaces all non-overlapping matches in `text` with the replacement provided. This is the same as calling `replacen` with `limit` set to `0`. See the
src/re.rs:466
↓ 7 callers
Method
set_split
(&mut self, i: InstIdx, pc1: InstIdx, pc2: InstIdx)
src/compile.rs:247
↓ 7 callers
Method
split
Returns an iterator of substrings of `text` delimited by a match of the regular expression. Namely, each element of the iterator corresponds to text t
src/re.rs:346
↓ 6 callers
Function
is_word
Returns true if the character is a word character, according to the (Unicode friendly) Perl character class '\w'. Note that this is only use for testi
src/vm.rs:510
↓ 6 callers
Method
pop_ast
(&mut self)
src/parse.rs:297
↓ 5 callers
Method
at
Returns the matched string for the capture group `i`. If `i` isn't a valid capture group or didn't match anything, then the empty string is returned.
src/re.rs:658
↓ 5 callers
Function
bench_assert_match
(b: &mut Bencher, re: Regex, text: &str)
src/test/bench.rs:16
↓ 5 callers
Function
has_match
(caps: &CaptureLocs)
src/re.rs:868
↓ 5 callers
Method
pos
(&self, c: char)
src/parse.rs:885
↓ 4 callers
Method
add
(&self, nlist: &mut Threads, pc: uint, groups: &mut [Option<uint>])
src/vm.rs:246
↓ 4 callers
Method
empty_split
(&mut self)
src/compile.rs:237
↓ 4 callers
Function
exec
(re: &Regex, which: MatchKind, input: &str)
src/re.rs:855
↓ 4 callers
Function
group
(letters)
regex-unicode-tables.py:83
↓ 4 callers
Method
paren
(&self)
src/parse.rs:112
↓ 4 callers
Method
peek
(&self, offset: uint)
src/parse.rs:897
↓ 4 callers
Method
pos_last
Searches the stack (starting at the top) until it finds an expression for which `pred` returns true. The index of that expression in the stack is retu
src/parse.rs:802
↓ 4 callers
Function
ranges_to_rust
(rs)
regex-unicode-tables.py:101
↓ 3 callers
Method
bar
(&self)
src/parse.rs:148
↓ 3 callers
Method
concat
concat starts at `from` in the parser's stack and concatenates all expressions up to the top of the stack. The resulting concatenation is then pushed
src/parse.rs:824
↓ 3 callers
Method
contains
(&self, pc: uint)
src/vm.rs:485
↓ 3 callers
Method
dummy_expr
Creates an expression with a dummy node ID given an underlying `ast::Expr_`.
src/macro.rs:623
↓ 3 callers
Function
exec_slice
(re: &Regex, which: MatchKind, input: &str, s: uint, e: uint)
src/re.rs:859
↓ 3 callers
Method
find_iter
Returns an iterator for each successive non-overlapping match in `text`, returning the start and end byte indices with respect to `text`. # Example
src/re.rs:226
↓ 3 callers
Method
is_greedy
(&self)
src/parse.rs:84
↓ 3 callers
Function
is_valid_unicode
(n)
regex-unicode-tables.py:48
↓ 3 callers
Function
make_fasta
( wr: &mut W, header: &str, mut it: I, mut n: uint)
benchmark/regex-dna/shootout-fasta.rs:61
↓ 3 callers
Method
next_char
(&mut self)
src/parse.rs:292
↓ 3 callers
Method
parse_uint
(&self, s: &str)
src/parse.rs:869
↓ 3 callers
Method
pos
Returns the start and end positions of the Nth capture group. Returns `None` if `i` is not a valid capture group or if the capture group did not match
src/re.rs:646
↓ 3 callers
Method
vec_expr
Converts `xs` to a `[x1, x2, .., xN]` expression by calling `to_expr` on each element in `xs`.
src/macro.rs:611
↓ 2 callers
Method
alternate
concat starts at `from` in the parser's stack and alternates all expressions up to the top of the stack. The resulting alternation is then pushed on t
src/parse.rs:837
↓ 2 callers
Method
arm_inst
Creates a match arm for the instruction at `pc` with the expression `body`.
src/macro.rs:574
↓ 2 callers
Function
as_4byte_uni
(n)
regex-unicode-tables.py:39
↓ 2 callers
Method
build_from
build_from combines all AST elements starting at 'from' in the parser's stack using 'mk' to combine them. If any such element is not an AST then it is
src/parse.rs:851
↓ 2 callers
Method
char_eq
(&self, casei: bool, textc: Option<char>, regc: char)
src/vm.rs:326
↓ 2 callers
Method
char_from_u32
(&self, n: u32)
src/parse.rs:877
↓ 2 callers
Method
char_is
(&self, textc: Option<char>, regc: char)
src/vm.rs:337
↓ 2 callers
Function
combine_ranges
Given an unordered collection of character ranges, combine_ranges returns an ordered sequence of character ranges where no two ranges overlap. They ar
src/parse.rs:920
↓ 2 callers
Method
empty
(&mut self)
src/vm.rs:491
↓ 2 callers
Method
empty_jump
(&mut self)
src/compile.rs:258
↓ 2 callers
Function
find_class
(classes: NamedClasses, name: &str)
src/parse.rs:986
↓ 2 callers
Method
get_next_greedy
Peeks at the next character and returns whether it's ungreedy or not. If it is, then the next character is consumed.
src/parse.rs:785
↓ 2 callers
Method
is_begin
(&self)
src/vm.rs:413
↓ 2 callers
Method
is_end
(&self)
src/vm.rs:418
↓ 2 callers
Function
is_punct
(c: char)
src/parse.rs:973
↓ 2 callers
Function
load_file
Load the file f into the string s. */
benchmark/regex-dna/regex-dna.c:226
↓ 2 callers
Method
match_insts
Builds a `match pc { ... }` expression from a list of arms, specifically for matching the current program counter with an instruction. A wild-card arm
src/macro.rs:566
↓ 2 callers
Method
num_captures
Returns the total number of capture groups in the regular expression. This includes the zeroth capture.
src/compile.rs:124
↓ 2 callers
Method
parse_escape
Parses all escape sequences. Assumes that '\' is the current character.
src/parse.rs:574
↓ 2 callers
Method
parse_hex_digits
Parses `s` as a hexadecimal number.
src/parse.rs:695
↓ 2 callers
Function
read_cats
(f)
regex-unicode-tables.py:52
↓ 2 callers
Function
read_scripts
(f)
regex-unicode-tables.py:63
↓ 2 callers
Function
read_tests
(f)
regex-match-tests.py:23
↓ 2 callers
Function
regcount
Return the number of times the regular expression "regexp_cstr" * uniquely matches against the input string "s". */
benchmark/regex-dna/regex-dna.c:115
↓ 2 callers
Function
regsub
Substitute each occurrence of the regular expression "regex" in "s" * with "subst". The result is returned in a newly allocate string * that must b
benchmark/regex-dna/regex-dna.c:179
↓ 2 callers
Method
replacen
Replaces at most `limit` non-overlapping matches in `text` with the replacement provided. If `limit` is 0, then all non-overlapping matches are replac
src/re.rs:476
↓ 2 callers
Function
run
(writer: &mut W)
benchmark/regex-dna/shootout-fasta.rs:77
↓ 2 callers
Method
set
(&mut self, ic: uint)
src/vm.rs:371
↓ 2 callers
Method
set_jump
(&mut self, i: InstIdx, pc: InstIdx)
src/compile.rs:267
↓ 2 callers
Method
splitn
Returns an iterator of at most `limit` substrings of `text` delimited by a match of the regular expression. (A `limit` of `0` will return no substring
src/re.rs:376
↓ 2 callers
Method
try_parse_ascii
Tries to parse an ASCII character class of the form [:name:]. If successful, returns an AST character class corresponding to name and moves the parser
src/parse.rs:447
↓ 2 callers
Method
wild_arm_expr
Creates a wild-card match arm with the expression `body`.
src/macro.rs:588
↓ 1 callers
Method
add_insts
Generates code for the `add` method, which is responsible for adding zero-width states to the next queue of states to visit.
src/macro.rs:320
↓ 1 callers
Method
advance
(&mut self)
src/vm.rs:397
↓ 1 callers
Method
capture
(&self)
src/parse.rs:126
↓ 1 callers
Method
capture_name
(&self)
src/parse.rs:134
↓ 1 callers
Method
captures_iter
Returns an iterator over all the non-overlapping capture groups matched in `text`. This is operationally the same as `find_iter` (except it yields inf
src/re.rs:316
↓ 1 callers
Method
check_prefix
Generates code for checking a literal prefix of the search string. The code is only generated if the regex *has* a literal prefix. Otherwise, a no-op
src/macro.rs:542
↓ 1 callers
Function
class_cmp
(casei: bool, mut textc: char, (mut start, mut end): (char, char))
src/vm.rs:538
↓ 1 callers
Method
code
(&mut self)
src/macro.rs:110
↓ 1 callers
Method
compile
(&mut self, ast: ~parse::Ast)
src/compile.rs:147
↓ 1 callers
Function
countMatches
(pat string, bytes []byte)
benchmark/regex-dna/regex-dna.go:47
↓ 1 callers
Function
count_matches
(seq: &str, variant: &Regex)
benchmark/regex-dna/regex-dna-single.rs:15
↓ 1 callers
Function
count_matches
(seq: &str, variant: &Regex)
benchmark/regex-dna/regex-dna.rs:26
↓ 1 callers
Method
expand
Expands all instances of `$name` in `text` to the corresponding capture group `name`. `name` may be an integer corresponding to the index of the capt
src/re.rs:707
↓ 1 callers
Function
expand_cat
(c)
regex-unicode-tables.py:44
↓ 1 callers
Function
find_prefix
(needle: &[u8], haystack: &[u8])
src/vm.rs:566
↓ 1 callers
Method
flags
(&self)
src/parse.rs:119
↓ 1 callers
Method
gen
(&mut self)
benchmark/regex-dna/shootout-fasta.rs:33
↓ 1 callers
Function
get_cpu_count
Return the number of cpus. If an error occurs, 0 cpus will be * reported. There are other ways to do this, but this is a program * to test regexp
benchmark/regex-dna/regex-dna.c:560
↓ 1 callers
Function
get_variant_index
This is a helper function for process_variant_worker() which is the * start routine for the threads that count how many times a variant * matches th
benchmark/regex-dna/regex-dna.c:276
↓ 1 callers
Method
groups
(&'r mut self, i: uint)
src/vm.rs:501
↓ 1 callers
Function
groups_to_rust
(groups)
regex-unicode-tables.py:106
↓ 1 callers
Method
is_word_boundary
Returns true if and only if the current position is a word boundary. (Ignoring the range of the input to search.)
src/vm.rs:422
↓ 1 callers
Function
main
()
benchmark/regex-dna/regex-dna.py:19
↓ 1 callers
Method
match_class
Translates a character class into a match expression. This avoids a binary search (and is hopefully replaced by a jump table).
src/macro.rs:514
↓ 1 callers
Method
name
Returns the matched string for the capture group named `name`. If `name` isn't a valid capture group or didn't match anything, then the empty string i
src/re.rs:670
next →
1–100 of 182, ranked by callers