Extra String Manipulation Functions
Overview
There are some things that I wish were easier with the 'stringr' or 'stringi' packages. The foremost of these is the extraction of numbers from strings. 'stringr' and 'stringi' make you figure out the regular expression for yourself; 'strex' takes care of this for you. There are many other handy functionalities in 'strex'. Contributions to this package are encouraged; it is intended as a miscellany of string manipulation functions that cannot be found in 'stringi' or 'stringr'.
BUG FIXES
- Numeric extraction functions (e.g.
str_extract_numbers(),str_nth_number(),str_nth_number_before_mth(),str_nth_number_after_mth(),str_extract_non_numerics(),str_nth_non_numeric(),str_split_by_numbers()) no longer error onNAinput or on strings with no matching number; they now correctly returnNA(#11).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- WARNING12 OK, 1 WARNING2026-06-07
Show 1 earlier changeHide 1 earlier change
- OK14 OK2026-03-10
Documentation
- Help pages
- 26includes a package overview page
- Examples that run
- 100%25 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 99%
- Return-value docs
- 88%
- Help pages citing references
- 8%
- Alphordering Numbers HTML
- And/Or Detection HTML
- Argument Matching HTML
- Before and After HTML
- Important Miscellany HTML
- Numbers Within Strings HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 7
- Median days to close, 50 most recently updated closed PRs
- 0
13 development-tooling and community-health practices detected across 8 families in the upstream repository
Checks run against github.com/rorynolan/strex on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-07-05 · The repository has a site deploy workflow
Show all practicesHide 4 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-07-03Named in .Rbuildignore: .claudeCommits: at least 2 crediting it in the message
- Claude Sonnet 52 commits · Jul 2026
Dependencies
Installing strex adds 10 packages (8 with compiled code, 14 MB of source tarballs). Heaviest: stringi 11 MB, vctrs 1.0 MB, rlang 766 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 2.1.0Latest
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 2.0.12024-10-04 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 2.0.02024-01-31 · diff ↗
- 1.6.12023-10-30 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.6.02023-01-21 · diff ↗
- 1.5.12023-01-14 · diff ↗
- 1.5.0
- 1.4.42022-10-20 · diff ↗
- 1.4.32022-07-24 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 1.4.22021-04-18 · diff ↗
Show 18 earlier eventsHide 18 earlier events
- 1.4.12020-10-17 · diff ↗
- 1.4.02020-10-10 · diff ↗
- 1.3.12020-10-02 · diff ↗
- 1.3.02020-09-25 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.2.02019-09-13 · diff ↗
- 1.1.12019-06-23 · diff ↗
- 1.1.02019-06-15 · diff ↗
- 1.0.32019-06-04 · diff ↗
- 1.0.22019-05-28 · diff ↗
- 1.0.12019-05-12 · diff ↗
- 1.0.02019-05-04 · diff ↗ ·
removed 3 exports
str_get_currencies, str_get_currency, str_split_by_numsadded 6 exports
str_elems, str_extract_currencies, str_first_currency, str_last_currency, str_nth_currency, str_split_by_numbers - RR 3.6.0 released · 2019-04-26
- 0.1.32018-11-30 · diff ↗
- 0.1.22018-10-20 · diff ↗
- 0.1.12018-09-20 · diff ↗
- 0.1.02018-09-01
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-09-01
- Total releases
- 25 / 8 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5
- Download size
- 142 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("strex")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.