Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Problema RegEx

  1. #1

    Problema RegEx

    ciao a tutti, mi è capitato di dover scrivere una regex in un file php, il problema è che non so assolutamente come si scrivono... c'è qualcuno che può spiegarmi come si fa o che può scrivere una regex che ritorni "vero" se trova come estensione in un file le substringhe ".svg" o ".svgz"? grazie in anticipo!
    L'ascensore può scendere su e giù...
    by Prof di Sistemi

  2. #2
    Prova con

    ^.*\.(svg|SVG|svgz|SVGZ)$

  3. #3
    non mi funziona, mi serve da mettere nel file js dove ci sono le opzioni per BlueImp JQuery File Upload.... però sostituendo la stringa

    codice:
    // The regular expression for allowed file types, matches             
    // against either file type or file name:             
    acceptFileTypes:  /.+$/i
    con

    codice:
    // The regular expression for allowed file types, matches             
    // against either file type or file name:             
    acceptFileTypes:  /^.*\.(svg|SVG|svgz|SVGZ)$/
    non cambia niente, mi lascia caricare sul server qualsiasi tipo di file...
    L'ascensore può scendere su e giù...
    by Prof di Sistemi

  4. #4
    Utente bannato
    Registrato dal
    Oct 2011
    Messaggi
    185
    anche a me stesso problema

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.