aboutsummaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authorache <ache@ache.one>2017-07-17 18:50:04 +0200
committerache <ache@ache.one>2017-07-17 18:50:04 +0200
commitbec432f0db0c13753550dcaa1dc51c1a973c4c4e (patch)
treeb930b106deac4d4833e59cac18194a4ffa870b1e /regex.c
parentDebug and numerical tags year and track in regex mode (diff)
Regex on selection
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/regex.c b/regex.c
index 0b01347..a96fe5e 100644
--- a/regex.c
+++ b/regex.c
@@ -101,6 +101,19 @@ void regexSelection(menuC* menu, const char* msg) {
}
}
}
+void regexXtracts(menuC* menu, const char* msg) {
+ int hasSelect = 0;
+ for(int i = 0 ; i < menu->nbElem ; i++ ) {
+ if( menu->list[i].selected == 1 ) {
+ regexXtract(&(menu->list[i]), msg);
+ hasSelect = 1;
+ }
+ }
+ if( !hasSelect ) {
+ regexXtract(&menu->list[menu->hl], msg);
+ }
+
+}
/*
* Example regex :
*