Debian系统只是忽略了POSIX Regex表达式

问题描述

无法匹配i386 / debian:stable docker容器中的以下表达式。

    <template>
      <ng-text-field
        v-model="value"
        :label="label || ' '"
        :placeholder="placeholder || ' '"
        :initial="initial"
        v-money="moneyConfig"
        v-on="$listeners"
        :autofocus="!isNullOrUndefined(autofocus) ? true : false"
        :max="max"
        :rules="rules"
      />
    </template>
    
    <script lang="ts">
    import { stringMoneyToNumber,isNullOrUndefined } from "@/mixins/utils";
    import { VMoney } from "@/components/money";
    export default {
      name: "TextFieldMoneyComponent",props: [
        "label","placeholder","autofocus","toFixed","prefix","max","rules","initial"
      ],directives: { money: VMoney },data: () => ({
        value: '',isValid: true,hasCheckValidate: true,// Manter se quiser que valide
      }),computed: {
        moneyConfig() {
          return {
            decimal: ",",thousands: ".",prefix: !isNullOrUndefined(this.prefix) ? `${this.prefix} ` : "R$ ",precision: !isNullOrUndefined(this.toFixed) ? this.toFixed : 2,};
        },},methods: {
        checkValidate() {
          (this as any).isValid = this.$children[0].checkValidate() || false;
          return (this as any).isValid;
        },isNullOrUndefined(val) {
          return isNullOrUndefined(val);
        },watch: {
        value() {
          if(/[R$]{2}/.test(this.value)) {
            (this.$emit as any)("input",stringMoneyToNumber(this.value));
          } else {
            (this.$emit as any)("input",0);
          }
          // if (!this.value) {
          //   (this.$emit as any)("input",0);
          // } else {
          //   (this.$emit as any)("input",stringMoneyToNumber(this.value));
          // }
        },};
    </script>
    
    <style lang="scss" scoped></style>

我要运行的示例代码是:

[:alnum:]   [:cntrl:]   [:lower:]   [:space:]
[:alpha:]   [:digit:]   [:print:]   [:upper:]
[:blank:]   [:graph:]   [:punct:]   [:xdigit:]

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)