regular expression

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Redazione  PianetaFantacalcio.it

    regular expression

    ragazzi come faccio a farmi accettare da una regular expression i caratteri
    numeri (da 0 a 9) il segno + oltre che il .


  • Evertjan.

    #2
    Re: regular expression

    Redazione PianetaFantacal cio.it wrote on 12 nov 2003 in
    comp.lang.javas cript:
    [color=blue]
    > ragazzi come faccio a farmi accettare da una regular expression i
    > caratteri numeri (da 0 a 9) il segno + oltre che il .[/color]

    /[\d\.+]+/


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Thomas 'PointedEars' Lahn

      #3
      Re: regular expression

      Redazione PianetaFantacal cio.it wrote:
      [color=blue]
      > ragazzi come faccio a farmi accettare da una regular expression i caratteri
      > numeri (da 0 a 9) il segno + oltre che il .[/color]

      My Italian is hardly usable, so using the
      Google Translation service I understand
      that you are looking for

      /\d+/

      If not, please post examples of the strings
      to be matched or write again in English.


      PointedEars

      Comment

      • Redazione  PianetaFantacalcio.it

        #4
        Re: regular expression

        me la scriveresti completa ........?
        "Evertjan." <exjxw.hannivoo rt@interxnl.net > ha scritto nel messaggio
        news:Xns9431EF0 D36A84eejj99@19 4.109.133.29...[color=blue]
        > Redazione PianetaFantacal cio.it wrote on 12 nov 2003 in
        > comp.lang.javas cript:
        >[color=green]
        > > ragazzi come faccio a farmi accettare da una regular expression i
        > > caratteri numeri (da 0 a 9) il segno + oltre che il .[/color]
        >
        > /[\d\.+]+/
        >
        >
        > --
        > Evertjan.
        > The Netherlands.
        > (Please change the x'es to dots in my emailaddress)[/color]


        Comment

        • Evertjan.

          #5
          Re: regular expression

          Redazione PianetaFantacal cio.it wrote on 12 nov 2003 in
          comp.lang.javas cript:[color=blue]
          > "Evertjan." <exjxw.hannivoo rt@interxnl.net > ha scritto nel messaggio
          > news:Xns9431EF0 D36A84eejj99@19 4.109.133.29...[color=green]
          >> Redazione PianetaFantacal cio.it wrote on 12 nov 2003 in
          >> comp.lang.javas cript:
          >>[color=darkred]
          >> > ragazzi come faccio a farmi accettare da una regular expression i
          >> > caratteri numeri (da 0 a 9) il segno + oltre che il .[/color]
          >>
          >> /[\d\.+]+/
          >>
          >>[/color]
          > me la scriveresti completa ........?[/color]

          <script>

          function testing(s){
          alert( /^[\d\.+]+$/.test(s) )
          }

          testing("+123.4 56") // true
          testing("-123.456") // false
          testing("+12A3. 456") // false

          </script>

          Me scusi, non parlo Italiano, prego di respondere/follow-up in Inglesi ?

          --
          Evertjan.
          The Netherlands.
          (Please change the x'es to dots in my emailaddress)

          Comment

          • Dr John Stockton

            #6
            Re: regular expression

            JRS: In article <boucaq$1ifgek$ 1@ID-107532.news.uni-berlin.de>, seen in
            news:comp.lang. javascript, Thomas 'PointedEars' Lahn
            <PointedEars@we b.de> posted at Wed, 12 Nov 2003 23:32:30 :-[color=blue]
            >Redazione PianetaFantacal cio.it wrote:
            >[color=green]
            >> ragazzi come faccio a farmi accettare da una regular expression i caratteri
            >> numeri (da 0 a 9) il segno + oltre che il .[/color]
            >
            >My Italian is hardly usable,
            > ...[/color]

            There is no need for you to answer questions that you do not properly
            understand. In a group such as this, it is reasonable to expect that,
            for each Western European language, there is at least one competent
            regular here who knows it sufficiently well.

            Chauvinism should be left to the French.

            --
            © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
            <URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
            <URL:http://www.merlyn.demo n.co.uk/js-index.htm> JS maths, dates, sources.
            <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.

            Comment

            • Dr John Stockton

              #7
              Re: regular expression

              JRS: In article <Xns94326CDC53B 68eejj99@194.10 9.133.29>, seen in
              news:comp.lang. javascript, Evertjan. <exjxw.hannivoo rt@interxnl.net >
              posted at Thu, 13 Nov 2003 09:42:05 :-
              [color=blue][color=green][color=darkred]
              >>> Redazione PianetaFantacal cio.it wrote on 12 nov 2003 in
              >>> comp.lang.javas cript:
              >>>
              >>> > ragazzi come faccio a farmi accettare da una regular expression i
              >>> > caratteri numeri (da 0 a 9) il segno + oltre che il .[/color][/color][/color]
              [color=blue]
              > alert( /^[\d\.+]+$/.test(s)[/color]

              If it is for accepting a decimal number, the RegExp should be more like

              /^[+-]?\d+(\.\d+)?$/
              or /^[+-]?\d+(\.\d+)?(e[-+]?\d+)?$/i allows -3.4e+56

              --
              © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
              <URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang. javascript
              <URL:http://www.merlyn.demo n.co.uk/js-index.htm> JS maths, dates, sources.
              <URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/JS/&c., FAQ topics, links.

              Comment

              • Thomas 'PointedEars' Lahn

                #8
                Re: regular expression

                Dr John Stockton wrote:
                [color=blue]
                > [...] Thomas 'PointedEars' Lahn [wrote]:[color=green]
                >>Redazione PianetaFantacal cio.it wrote:
                >>[color=darkred]
                >>> ragazzi come faccio a farmi accettare da una regular expression i caratteri
                >>> numeri (da 0 a 9) il segno + oltre che il .[/color]
                >>
                >>My Italian is hardly usable,
                >> ...[/color]
                >
                > [...]
                > Chauvinism should be left to the French.[/color]

                Do not conclude from your strange thinking about other nations to
                that of other ones. All I wanted to do is trying to help. As said
                before, this is no support forum, you do not always get the answer
                you expected.


                PointedEars

                Comment

                • Dr John Stockton

                  #9
                  Re: regular expression

                  JRS: In article <bp282l$1ked9c$ 1@ID-107532.news.uni-berlin.de>, seen in
                  news:comp.lang. javascript, Thomas 'PointedEars' Lahn
                  <PointedEars@we b.de> posted at Fri, 14 Nov 2003 10:44:33 :-[color=blue]
                  >Dr John Stockton wrote:
                  >[color=green]
                  >> [...] Thomas 'PointedEars' Lahn [wrote]:[color=darkred]
                  >>>Redazione PianetaFantacal cio.it wrote:
                  >>>
                  >>>> ragazzi come faccio a farmi accettare da una regular expression i[/color][/color]
                  >caratteri[color=green][color=darkred]
                  >>>> numeri (da 0 a 9) il segno + oltre che il .
                  >>>
                  >>>My Italian is hardly usable,
                  >>> ...[/color]
                  >>
                  >> [...]
                  >> Chauvinism should be left to the French.[/color]
                  >
                  >Do not conclude from your strange thinking about other nations to
                  >that of other ones. All I wanted to do is trying to help. As said
                  >before, this is no support forum, you do not always get the answer
                  >you expected.[/color]

                  When you do not understand an article, then, if it is likely that others
                  will understand it, just wait and read their replies.

                  There is no obligation on a questioner to write so that any particular
                  person can understand the question, and there is no obligation on a
                  reader to understand any particular question or answer.

                  --
                  © John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 MIME ©
                  Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
                  Web <URL:http://www.merlyn.demo n.co.uk/news-use.htm> : about usage of News.
                  No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.

                  Comment

                  Working...