oops
This commit is contained in:
parent
012e7dbee6
commit
5b39cfa789
3 changed files with 0 additions and 28 deletions
|
@ -1,22 +0,0 @@
|
|||
use regex::Regex;
|
||||
use std::fs;
|
||||
|
||||
fn main() {
|
||||
let re = Regex::new(r"(?m)(^|\n)([#]+)(( |\t)+)(.+)$").unwrap();
|
||||
|
||||
//let src = fs::read_to_string("./readme.nml").unwrap();
|
||||
let src = String::from("# Test\n## Second line!\n### Third");
|
||||
|
||||
let mut result = Vec::<String>::new();
|
||||
for (line, [_, count, spacing, string]) in re.captures_iter(&src).map(|v| v.extract())
|
||||
{
|
||||
println!("`{line}`:\n{count}/{spacing}/{string}\n");
|
||||
}
|
||||
//test(&p);
|
||||
|
||||
/*
|
||||
*/
|
||||
//t1.join().unwrap();
|
||||
//t2.join().unwrap();
|
||||
|
||||
}
|
Binary file not shown.
6
test.nml
6
test.nml
|
@ -1,6 +0,0 @@
|
|||
Line1
|
||||
##{refname}+
|
||||
##*a* inc
|
||||
######+ First section
|
||||
second
|
||||
##* Subsectiona
|
Loading…
Reference in a new issue