Hi Jim,

In our cms 'Teamsite' our users will create a primary navigation menu using one of the 
templates

In the template I require them to enter the Anchor text and url for each of the 
primary menu items

for the purposes of this example I will provide only the Anchor text below

e.g Home, Enrolments, Courses, Getting Here, News & Events, About Us

As well as providing the primary menu above they then will provide a secondary menu.

In the secondary menu template they have to associate the menu they are building with 
one of the primary menu items above they do this by choosing from a drop down list. 
This list is derived by a perl script I have written that parses the primary nav menu 
xml record and returns a drop down list of options.

the label being the primary menu items as above 
the value will be the filename generated by the regex that we are trying to write.

So in short the regex must remove any characters from the anchor text e.g the & in 
'News & events'
and any spaces, basically any characters that cannot be used in a filename if they 
have been inadvertently entered by the users.

Any help appreciated thank you
Colin






-----Original Message-----
From: Jim [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 14, 2004 3:32 PM
To: Johnstone, Colin
Cc: [EMAIL PROTECTED]
Subject: RE: Regex help


 
> 
> Hi Jim,
> 
> rather than re-invent the wheel I would prefer if you could 
> fix this regex I believe it covers all invalid characters one 
> would encounter
> 
> s/[<sup>\w\&amp;%'[EMAIL PROTECTED](\)&amp;_\</sup>\+,\.=\[\]]//g;
> 
> I would then use it as a general purpose regex for validating 
> filenames.

Please tell us what your are trying to do. without knowing more, this regex
does not make any sense to me

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.745 / Virus Database: 497 - Release Date: 8/27/2004
 



This E-Mail is intended only for the addressee. Its use is limited to that
intended by the author at the time and it is not to be distributed without the
author's consent. Unless otherwise stated, the State of Queensland accepts no
liability for the contents of this E-Mail except where subsequently confirmed in
writing. The opinions expressed in this E-Mail are those of the author and do
not necessarily represent the views of the State of Queensland. This E-Mail is
confidential and may be subject to a claim of legal privilege.

If you have received this E-Mail in error, please notify the author and delete this 
message immediately.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to