pub struct Regex {}Fields§
§prog: Vec<Inst>§ngroups: usize§ignorecase: bool§multiline: bool§dotall: bool§global: bool§sticky: bool§has_indices: boold(hasIndices)フラグ。true なら exec() の結果に各キャプチャの
[start,end) 文字インデックスを持つ indices 配列を追加する。
unicode: bool§unicode_sets: bool§source: String§flags: String§group_names: Vec<(String, usize)>名前付きキャプチャグループ (?<name>...)(ES2018)の (名前, グループ番号) 一覧。
一つも無ければ空(exec() の groups プロパティは undefined になる)。
Implementations§
Source§impl Regex
impl Regex
Sourcepub fn find_exact_at(&self, subject: &[char], start: usize) -> Option<Match>
pub fn find_exact_at(&self, subject: &[char], start: usize) -> Option<Match>
y(sticky)フラグ用: start の位置でのみマッチを試みる(前方探索しない)。
通常の find_at と違い、その場所で一致しなければ探索を打ち切って None を返す。
fn try_match_at(&self, subject: &[char], sp: usize) -> Option<Match>
fn run( &self, pc: usize, s: &[char], sp: usize, caps: &mut Vec<isize>, budget: &mut u32, ) -> bool
Auto Trait Implementations§
impl Freeze for Regex
impl RefUnwindSafe for Regex
impl Send for Regex
impl Sync for Regex
impl Unpin for Regex
impl UnsafeUnpin for Regex
impl UnwindSafe for Regex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more