[phorm] [Phorm:] Re: Regular expression

  • From: webbbs@xxxxxxxxx
  • To: support@xxxxxxxxx
  • Date: 24 Apr 2003 11:49:29 -0000

The following new message has been posted on Phorm Support Forum at 
<http://www.phorm.com/support/>. 

*************************************************************************** 

  MESSAGE:  (#2582) Re: Regular expression 
            <http://www.phorm.com/support/?rev=2582> 
  AUTHOR:   Holotech 
  DATE:     April 24, 2003 at 7:49 a.m. EST 

  Reply To: (#2581) Regular expression 
  Author:   Peter 
  Date:     April 24, 2003 at 5:43 a.m. EST 

> Hello, 

> I'm sorry, I don't understand how to write a 
> field-validation with regular expression in the 
> rules.txt, when I want the user to write the hardware 
> adress of an ethernet card. 

> E.g. 00:00:34:3F:4D:AC or 00-00-34-3F-4D-AC 

This will do it: 


^[0-9A-F]{2}[:-][0-9A-F]{2}[:-][0-9A-F]{2}[:-][0-9A-F]{2}[:-][0-9A-F]{2}[:-][0-9A-F]{2}$
 

Actually, so would: 

^([0-9A-F]{2}[:-]){5}[0-9A-F]{2}$ 

except I kind of shot myself in the foot with the way I implemented 
conditional validation rules; Phorm sees () as indicating a condition. 

*************************************************************************** 

This is an automatically-generated notice.  If you'd like to be removed from 
the mailing list, please visit Phorm Support Forum at 
<http://www.phorm.com/support/>, or send your request to webbbs@xxxxxxxxxx  If 
you wish to respond to this message, please post your response directly to the 
board.  Thank you! 
-------------------------------------------------
You are receiving this message because you are subscribed to the Phorm mailing 
list. To send messages to the mailing list, simply send email to 
phorm@xxxxxxxxxxxxx from the address you have subscribed. You may unsubscribe 
from the list by sending email to phorm-request@xxxxxxxxxxxxx with 
'unsubscribe' in the SUBJECT field.

Other related posts:

  • » [phorm] [Phorm:] Re: Regular expression