Remove all remaining validator_regexp
This commit is contained in:
parent
373bd83640
commit
ecb815666e
@ -797,7 +797,7 @@ type uploadedFlag struct {
|
||||
IgnoreCase bool
|
||||
Multiline bool
|
||||
NoTrim bool
|
||||
CaptureRe *string `json:"validator_regexp"`
|
||||
CaptureRe *string `json:"capture_regexp"`
|
||||
SortReGroups bool `json:"sort_re_grps"`
|
||||
Flag string
|
||||
Value []byte
|
||||
|
@ -32,8 +32,8 @@ function treatFlagKey(flag) {
|
||||
if (flag.value && flag.soluce) {
|
||||
if (flag.ignore_case)
|
||||
flag.value = flag.value.toLowerCase();
|
||||
if (flag.validator_regexp) {
|
||||
var re = new RegExp(flag.validator_regexp, flag.ignore_case?'ui':'u');
|
||||
if (flag.capture_regexp) {
|
||||
var re = new RegExp(flag.capture_regexp, flag.ignore_case?'ui':'u');
|
||||
var match = re.exec(flag.value);
|
||||
match.shift();
|
||||
flag.value = match.join("+");
|
||||
|
@ -47,8 +47,8 @@
|
||||
<input type="text" id="kflag{{flag.id}}" ng-model="flag.flag" class="form-control form-control-sm" placeholder="Chaîne brute à valider" ng-if="!flag.id || flag.show_raw" title="Chaîne brute à valider">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="kvre{{flag.id}}" class="col-form-label-sm">Validator regexp</label>
|
||||
<input type="text" id="kvre{{flag.id}}" ng-model="flag.validator_regexp" class="form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
|
||||
<label for="kvre{{flag.id}}" class="col-form-label-sm">Capture regexp</label>
|
||||
<input type="text" id="kvre{{flag.id}}" ng-model="flag.capture_regexp" class="form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-auto custom-control custom-checkbox ml-1">
|
||||
|
@ -211,7 +211,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="text" id="kvre{{flag.id}}" ng-model="flag.validator_regexp" class="col form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
|
||||
<input type="text" id="kvre{{flag.id}}" ng-model="flag.capture_regexp" class="col form-control form-control-sm" placeholder="Regexp selecting validation string" title="Regexp selecting validation string">
|
||||
</div>
|
||||
</form>
|
||||
<form ng-submit="testFlag(flag)">
|
||||
|
@ -52,8 +52,8 @@
|
||||
soluce = soluce.toLowerCase();
|
||||
}
|
||||
|
||||
if (flag.validator_regexp) {
|
||||
let re = new RegExp(flag.validator_regexp, flag.ignore_case?'i':'');
|
||||
if (flag.capture_regexp) {
|
||||
let re = new RegExp(flag.capture_regexp, flag.ignore_case?'i':'');
|
||||
soluce = soluce.match(re).slice(1).join("+");
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ type myTeamFlag struct {
|
||||
IgnoreOrder bool `json:"ignore_order,omitempty"`
|
||||
IgnoreCase bool `json:"ignore_case,omitempty"`
|
||||
Multiline bool `json:"multiline,omitempty"`
|
||||
CaptureRe *string `json:"validator_regexp,omitempty"`
|
||||
CaptureRe *string `json:"capture_regexp,omitempty"`
|
||||
Solved *time.Time `json:"found,omitempty"`
|
||||
PSolved *time.Time `json:"part_solved,omitempty"`
|
||||
Soluce string `json:"soluce,omitempty"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user