function ranges

Is there a way of creating 2 function ranges together? I need a range that accepts a temperature of either 18-22 C or 64.4 -71.6 F. I tried a regex but understand that this only works with INT numbers. The following was not acceptable: func: range(18.0,22.0)(64.4,71.6)

Answers

  • haenselhaensel Posts: 537 ✭✭
    Hi

    This regexp should work.

    ((18\.0|22\.0|(19|20|21)\.[0-9])|(64\.[4-9]|(6[5-9]\.[0-9])|70\.[0-9]|71\.[0-6]))

    Regards,
    Christian
  • Michelle_DMichelle_D Posts: 82
    Is this a Regex? or function? if Regex, i thought you could only use single numbers 0-9 ?
  • Michelle_DMichelle_D Posts: 82
    the second part works (64.4 -71.6) but the first part doesn't
  • haenselhaensel Posts: 537 ✭✭
    So maybe there is a little typo or I missed something else but the concept should be clear, or?

    Regards,
    Christian
  • Michelle_DMichelle_D Posts: 82
    via Email
    Yeah, thanks. I will check it out.

    Michelle Danieli
    Data Manager & Accounts
    A.Stein-Regulatory Affairs Consulting Ltd.

    E-mail: michelle@asteinrac.com
    Tel: +972-9-7670002
    Fax: +972-9-7668534
    Mobile: +972 523 593142 (for whatsapp purposes)

    A. Stein -Regulatory Affairs Consulting Ltd.
    20 HaTa'as St. (P.O.B. 124)
    Beit Hapa'amon Bldg (Suite 102)
    Kfar Saba 4442520
    ISRAEL
  • haenselhaensel Posts: 537 ✭✭
    Could you please provide an example that does not match? I can not find an obvious mistake.

    Regards,
    Christian
  • Michelle_DMichelle_D Posts: 82
    I have found the problem. I entered 18 and 19, whereas the regexp accepts 18.0 and 19.0 etc. I have to allow for numbers without decimals too.
  • haenselhaensel Posts: 537 ✭✭
    Ok.

    Good luck
  • Michelle_DMichelle_D Posts: 82
    i got it to work!! thanks for all your help :-))
  • haenselhaensel Posts: 537 ✭✭
    No problem. You're welcome.
Sign In or Register to comment.