Git Product home page Git Product logo

Comments (3)

janniksam avatar janniksam commented on August 22, 2024

Further more I'd rather use ^[+-]([0-9]|[1-3][0-9]|40)dB$ for the soundLevel, because Google limits it between -40dB and +40dB.

from ssml-check.

gsdriver avatar gsdriver commented on August 22, 2024

Good catches - I published version 0.2.2 with fixes:

  • updated speed to check for the trailing %, and to make sure that the value is between 50 and 200.
  • For soundLevel, I also make sure the value is between -40 and +40. I can't exactly use the regEx you noted since this is a real number (need to account for decimals).

from ssml-check.

janniksam avatar janniksam commented on August 22, 2024

Oops. My bad. I didn't read, they allow decimal places.

Here is an updated RegEx. Please take note, I limited the decimal places to two places max:
^[+-](([0-9](\.\d{1,2})?)|([1-3][0-9](\.\d{1,2})?)|40)dB$

https://regex101.com/r/6S5SFj/1

from ssml-check.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.