Skip to content

An R Interface to the Onigmo Regular Expression Library

3packages depend
13.5Kdownloads / year
43.9%test coverage
10/13flavors OK

Overview

About

Provides an alternative to R's built-in functionality for handling regular expressions, based on the Onigmo library. Offers first-class compiled regex objects, partial matching and function-based substitutions, amongst other features.

Changes in 1.8.0
  • The bundled Onigmo regular expression library has been brought up to date with fixes made since version 6.2.0, both upstream and in the copy maintained as part of Ruby. These address a number of crashes, memory errors and incorrect results, particularly with unusual or malformed regexes.
  • Unicode data has been updated from version 9.0 to version 17.0, so character properties (\p{...}) and case-insensitive matching now cover recent additions such as additional scripts and emoji. The \X (extended grapheme cluster) escape, which previously crashed R when used with UTF-8 text, now works and follows current Unicode segmentation rules.
  • A group that matches an empty string is now returned as an empty string, rather than NA. Groups that don't take part in a match are still NA, and their offsets and lengths are now NA too.
Show all changes in 1.8.0Hide the rest of the changes in 1.8.0
  • When several replacement strings are given to ore_subst(), they are now applied to successive matches, as documented. Previously the last one used was applied to all matches, unless the replacements contained back-references.
  • Strings with no declared encoding (such as those read by readLines() without its encoding argument) are now matched in the encoding given by the ore.encoding option when the regex is given as a string, rather than being treated as ASCII. Previously, for example, \w would not match accented letters in such strings.
  • Encoding names are now matched in full, and in a case-insensitive and separator-insensitive way, so names such as "ISO-8859-15" are now handled correctly rather than being treated as ISO-8859-1 (due to a partial match). The "LATINn" aliases now refer to the standard encodings, and unrecognised names give a warning.
  • Text read from files or connections in encodings other than ASCII, UTF-8 or Latin-1 (e.g., Shift-JIS) is now converted to UTF-8 when returned to R.
  • Searching files in UTF-16 or UTF-32 now works.
  • Results from UTF-8 text are no longer corrupted when the session locale uses a different encoding.
  • Vectors mixing UTF-8 and Latin-1 strings are now searched fully when the regex is given as a string, rather than elements in the "other" encoding being skipped with a warning.
  • Regexes created with ore() and then saved (e.g., with saveRDS()) and loaded again now keep their options and syntax.
  • Starting positions passed to the main functions must now be positive integers; zero, negative and NA values produce an error rather than being quietly treated as giving no match. Starting positions beyond the end of the text, which crashed R with multibyte encodings, now consistently give no match.
  • Calling ore() with a missing (NA) pattern is now an error, and unsupported letters in its options argument produce a warning rather than being ignored.
  • ore_repl() now passes the correct matched text to replacement functions when there are several matches and the regex contains groups, and no longer fails when there are several groups and several matches.
  • Back-references to groups that don't take part in a match, or match an empty string, previously crashed R. They are now replaced with nothing.
  • The \G anchor could match when it shouldn't, because a failed search was retried from later in the text. Failed searches are no longer repeated, which also makes searches faster when many strings don't match.
  • Character offsets of repeated empty matches were wrong in multibyte encodings. This has been corrected.
  • Searching large numbers of strings, with ore_search() or %~%, is now substantially faster, due to more efficient memory use.
  • Printed matches now use display widths based on current Unicode data, so emoji, wide characters and newer combining marks line up correctly. Text is converted to the session's encoding for display, with characters that can't be shown replaced by "?", and carriage returns are shown as "\r". A crash when printing text containing many zero-width characters has been fixed.
  • es() now only removes the escape from "\\#{", leaving other backslashes intact.
  • Connections opened by the package in order to search them are now closed again afterwards. Connections that were already open are left open.
  • ore_escape() now preserves the declared encoding of its argument.
  • The native encoding is now detected more reliably when the package is loaded, using R's own locale information where possible. In a Latin-1 locale the ore.encoding option is now set to "latin1", and the C locale is treated as ASCII without a startup message.

From NEWS in the release

Install

Health

CRAN checks
3NOTE10OK
Check messages
NOTEcompiled coder-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64

r-oldrel-macos-arm64, r-oldrel-macos-x86_64

File ‘ore/libs/ore.so’:
  Found non-API calls to R: ‘R_GetConnection’, ‘R_ReadConnection’

Compiled code should not call non-API entry points in R.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual,
and section ‘Moving into C API compliance’ for issues with the use of
non-API entry points.

r-oldrel-windows-x86_64

File 'ore/libs/x64/ore.dll':
  Found non-API calls to R: 'R_GetConnection', 'R_ReadConnection'

Compiled code should not call non-API entry points in R.

See 'Writing portable packages' in the 'Writing R Extensions' manual,
and section 'Moving into C API compliance' for issues with the use of
non-API entry points.

CRAN check page ↗

Slowest check: 2.9 min · r-devel-windows-x86_64
Status changes
  • NOTE10 OK, 3 NOTENow
  • NOTE11 OK, 2 NOTE2026-10-08
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.8.0
READMEYes · 2,069 wordsVignettesNoNEWSYes · 33% structured · mentions 1.8.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
13
Examples that run
100%8 run in a plain check
Exported functions with examples
67%
Documented parameters
98%
Return-value docs
100%
Help pages citing references
0%

Downloads

13.5K
CRAN downloads in the past year
Rank #3,580 · ~37/day · ~1.1K/mo
Daily download trend is not available in this view yet.
1.4K30 days
2.8K90 days
13.5K1 year
Compare downloads with other packages →
Also on400 r2u4 autocran5.1K conda_forge154 bioconda133 c2d4u

Repository

56Stars
2Forks
0Open issues
0Open PRs
6Releases
367Commits
2Commit identities
rregular-expressionsregextext-analysis
367 commits · Last activity 2026-10-07 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
1
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-03-12 · 552026-07-07 · 56
PracticesBeta

6 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/jonclayden/ore on 2026-10-18.

Continuous integration (3)
GitHub ActionsR CMD check workflowTravis CI (config file)

The R CMD check workflow runs on Linux and Windows

Docs source (1)
README.Rmd
Coverage (2)
Coverage reporting.covrignore
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

Installing ore adds no packages beyond those that come with R.

Depends (0)
none
Imports (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
3direct
2indirect
Imports 3
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (3)
Maintainer since 1.0.0 (2014), Author
Author · added in 1.7.5.1
Author · added in 1.7.5.1
Listed in earlier versions (2)
K. Kosako
no longer listed · 1.0.0 to 1.7.4.1
K. Takata
no longer listed · 1.0.0 to 1.7.4.1
Releases (22)

Pick two releases to compare their code metrics.

  • 1.8.0Latest
    record
    2026-10-07 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 1.7.5.1
    record
    2025-03-14 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 1.7.4.1
    record
    2023-12-05 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 1.7.3.1
    record
    2023-01-16 · diff ↗
  • 1.7.2.1
    record
    2022-11-01 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 1.7.1.1
    record
    2021-11-02 · diff ↗
  • 1.7.0
    record
    2021-10-12 · diff ↗ ·
    added 6 exports
    ore.match, ore.repl, ore.switch, ore_match, ore_repl, ore_switch
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 1.6.3
    record
    2019-11-02 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
Show 19 earlier eventsHide 19 earlier events

Package metadata

First published
2014-10-20
Total releases
22 / 12 yrs
License
BSD_3_clause + file LICENCE OSI
Bundled data
5.3 KB / 1 file
Download size
488 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("ore")
Clayden, J., Kosako, K., & Takata, K. (2026). ore: An R Interface to the Onigmo Regular Expression Library (Version 1.8.0) [Computer software]. https://doi.org/10.32614/CRAN.package.ore

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for ore version 1.8.0 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy