Function arrow2::compute::regex_match::regex_match_scalar
source · [−]pub fn regex_match_scalar<O: Offset>(
values: &Utf8Array<O>,
regex: &str
) -> Result<BooleanArray>
Available on crate feature
compute_regex_match
only.Expand description
Regex matches
Example
use arrow2::array::{Utf8Array, BooleanArray};
use arrow2::compute::regex_match::regex_match_scalar;
let strings = Utf8Array::<i32>::from_slice(&vec!["ArAow", "A_B", "AAA"]);
let result = regex_match_scalar(&strings, "^A.A").unwrap();
assert_eq!(result, BooleanArray::from_slice(&vec![true, false, true]));