Fixed regex for editing title

This commit is contained in:
G2-Games 2024-05-29 21:30:53 -05:00
parent 641c91bb7d
commit 151214764a

View file

@ -419,7 +419,7 @@ impl NetMDContext {
let new_fw_name_with_groups;
if has_fw_groups {
if has_fw_groups_and_title {
let re = Regex::new("/^.*?/").unwrap();
let re = Regex::new(r"^.*?").unwrap();
new_fw_name_with_groups = re
.replace_all(
&old_raw_fw_name,
@ -432,7 +432,7 @@ impl NetMDContext {
.into()
} else {
new_fw_name_with_groups =
format!(r"{}{}", new_fw_name.unwrap(), old_raw_fw_name);
format!("{}{}", new_fw_name.unwrap(), old_raw_fw_name);
}
} else {
new_fw_name_with_groups = new_fw_name.unwrap();
@ -450,7 +450,7 @@ impl NetMDContext {
let new_name_with_groups;
if has_groups {
if has_groups_and_title {
let re = Regex::new(r"/^0;.*?\/\//").unwrap();
let re = Regex::new(r"^0;.*?\/\/").unwrap();
new_name_with_groups = re
.replace_all(
&old_raw_name,