// 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)mat-column-(\w+)[^>]*>(?:<[^>]*>)*([^<]*)").unwrap();
let string = "<mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"6%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-status mat-column-status ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 6%;\"><mat-icon _ngcontent-ifd-c336=\"\" role=\"img\" class=\"mat-icon notranslate mat-tooltip-trigger material-icons app-list-icon-yellow mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\" aria-describedby=\"cdk-describedby-message-1\" cdk-describedby-host=\"\"> info </mat-icon><!----><!----></mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"8%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-taskObjectExternalId mat-column-taskObjectExternalId ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 8%;\"><a _ngcontent-ifd-c336=\"\" href=\"/applications/tab/customer-tab?id=103085\"> 101010 </a></mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"12%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-type mat-column-type ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 12%;\"><section _ngcontent-ifd-c336=\"\" fxflex=\"100%\" fxlayout=\"row wrap\" style=\"flex-flow: wrap; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 100%;\"><span _ngcontent-ifd-c336=\"\" fxflex=\"100%\" fxlayoutalign=\"left center\" class=\"extra-info\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 100%;\"> WBSO 2023 </span><span _ngcontent-ifd-c336=\"\" fxflex=\"100%\" fxlayoutalign=\"left center\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 100%;\"> Customer approval <!----><!----></span></section></mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"15%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-customerName mat-column-customerName ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 15%;\"> Example customer </mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"10%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-creationDate mat-column-creationDate ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 10%;\"> 16 Days ago </mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"10%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-deadLine mat-column-deadLine ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 10%;\"><!----><span _ngcontent-ifd-c336=\"\" class=\"ng-star-inserted\"> 4 Days left </span><!----><!----><!----><!----><!----></mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"10%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-createdBy mat-column-createdBy ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 10%;\"> </mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"8%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-reminderSent mat-column-reminderSent ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 8%;\"> 0 </mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"8%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-lastModifiedDate mat-column-lastModifiedDate ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 8%;\"> </mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"7%\" fxlayoutalign=\"left center\" class=\"mat-cell cdk-cell cdk-column-visible mat-column-visible ng-star-inserted\" style=\"place-content: center flex-start; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 7%;\"><mat-icon _ngcontent-ifd-c336=\"\" role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color ng-star-inserted\" aria-hidden=\"true\" data-mat-icon-type=\"font\"> visibility_on </mat-icon><!----><!----></mat-cell><mat-cell _ngcontent-ifd-c336=\"\" role=\"cell\" fxflex=\"5%\" fxlayoutalign=\"end center\" class=\"mat-cell cdk-cell cdk-column-actions mat-column-actions ng-star-inserted\" style=\"place-content: center flex-end; align-items: center; flex-direction: row; box-sizing: border-box; display: flex; flex: 1 1 100%; max-width: 5%;\"><button _ngcontent-ifd-c336=\"\" mat-icon-button=\"\" class=\"mat-focus-indicator mat-menu-trigger mat-icon-button mat-button-base\" aria-haspopup=\"true\"><span class=\"mat-button-wrapper\"><mat-icon _ngcontent-ifd-c336=\"\" role=\"img\" class=\"mat-icon notranslate material-icons mat-icon-no-color\" aria-hidden=\"true\" data-mat-icon-type=\"font\">settings</mat-icon></span><span matripple=\"\" class=\"mat-ripple mat-button-ripple mat-button-ripple-round\"></span><span class=\"mat-button-focus-overlay\"></span></button><!----><mat-menu _ngcontent-ifd-c336=\"\" class=\"ng-star-inserted\"><!----></mat-menu></mat-cell><!---->";
// 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/