RegExp pattern to scan for NO HTML tags - need help
From: Phil Powell (soazine_at_erols.com)
Date: 01/29/04
- Next message: CountScubula: "Re: Post Without Return"
- Previous message: Thomas Jollans: "Re: php mail function (linux)"
- Next in thread: Andy Hassall: "Re: RegExp pattern to scan for NO HTML tags - need help"
- Reply: Andy Hassall: "Re: RegExp pattern to scan for NO HTML tags - need help"
- Reply: Dmitry Ruban: "Re: RegExp pattern to scan for NO HTML tags - need help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Jan 2004 11:21:23 -0800
I am having to use an existing FormValidator class to check form
elements, and one of the things I must check is to see if someone
entered tags in the string <>; if so, it must flag for that.
However, the catch is that, the way FormValidator class is written, I
can't use this pattern:
/<[^>]+>/
because it needs to check for the pattern of the NEGATION of that for
FormValidator class to work. In other words, it must match the pattern
something like this:
! /<[^>]+>/
But the only way I can do this is to create a pattern and nothing
more; no other code of any kind except the literal pattern formed in
such a way to check for everything BUT a tag!
I also cannot use str_replace and strip out the tags; I can't use
htmlentities and translate the tags.. the requirements are to FLAG the
user if a tag is found but by NOT using the pattern to find one, but
to ONLY use the pattern to find the NEGATION of finding one!!!
Mind bender, I know.
HELP!
Phil
- Next message: CountScubula: "Re: Post Without Return"
- Previous message: Thomas Jollans: "Re: php mail function (linux)"
- Next in thread: Andy Hassall: "Re: RegExp pattern to scan for NO HTML tags - need help"
- Reply: Andy Hassall: "Re: RegExp pattern to scan for NO HTML tags - need help"
- Reply: Dmitry Ruban: "Re: RegExp pattern to scan for NO HTML tags - need help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|