// include the latest version of the regex crate in your Cargo.toml
extern crate regex;
use regex::Regex;
fn main() {
let regex = Regex::new(r"(?m)(租赁)?.{0,9}确认(为)?使用权资产").unwrap();
let string = "租赁期开始日,本公司对租赁确认使用权资产和租赁负债
租赁期开始日,对租赁确认使用权资产和租赁负债
本公司对租赁确认使用权资产和租赁负债。
本集团在租赁期开始日对租赁确认使用权资产和租赁负债
公司对租赁确认使用权资产和租赁负债
本公司对租赁确认使用权资产和租赁负债
本公司对租赁确认使用权资产和租赁负债
在租赁期开始日,本公司对租赁确认使用权资产和租赁负债
在租赁期开始日,公司对租赁确认使用权资产和租赁负债。
在租赁期开始日,公司对租赁确认使用权资产和租赁负债
本公司选择确认使用权资产和租赁负债,
本公司对租赁确认使用权资产和租赁负债。
对租赁确认使用权资产和租赁负债
本公司对租赁确认使用权资产和租赁负债。
确认使用权资产和租赁负债
本集团对租赁确认使用权资产和租赁负债
确认为使用权资产,确认为租赁负债
本公司对租赁确认使用权资产和租赁负债
在租赁期开始日,公司对租赁确认使用权资产和租赁负债
公司租入资产所支付的租赁费,在不扣除免租期的整个租赁期内,按直线法进行分摊,计入当期费用
在租赁期开始日,公司对租赁确认使用权资产和租赁负债
在租赁期开始日,公司对租赁确 认使用权资产和租赁负债
在租赁期开始日,本公司对租赁确认使用权资产,确认租赁负债。
在租赁期开始日,公司对租赁确认使用权资产和租赁负债
本集团在租赁期开始日对租赁确认使用权资产,租赁负债
在租赁期开始日,公司对租赁确认使用权资产和租赁负债。
";
// result will be an iterator over tuples containing the start and end indices for each match in the string
let result = regex.captures_iter(string);
for mat in result {
println!("{:?}", mat);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Rust, please visit: https://docs.rs/regex/latest/regex/