CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions:
negate a word#?#?#?#?#?

 



shinned
Deleted

Sep 6, 2000, 1:21 AM

Post #1 of 4 (2415 views)
negate a word#?#?#?#?#? Can't Post

Help badly needed.

How do we negate a word?

shinned


japhy
Enthusiast / Moderator

Sep 6, 2000, 3:41 AM

Post #2 of 4 (2415 views)
Re: negate a word#?#?#?#?#? [In reply to] Can't Post

Could you give an example of what you mean, maybe? Do you mean "how do I specifically NOT match a word?" I have no idea what you mean. Please explain.

------------------
Jeff "japhy" Pinyan -- accomplished author, consultant, hacker, and teacher



shinned
Deleted

Sep 6, 2000, 4:13 AM

Post #3 of 4 (2415 views)
Re: negate a word#?#?#?#?#? [In reply to] Can't Post

 
Ex.

Text is :

<emp type="bold">text here. ( could be a multi-line</emp>

RE is :

/<emp [^<>]*>(.*)</emp>/

now how do I know that .* does not contain any <emp> or </emp> tag? Whis this I want to negate the word/text "<emp>" or "</emp>", How do I do that?


Thanks in advance.

shinned


dws
Deleted

Sep 7, 2000, 10:23 AM

Post #4 of 4 (2415 views)
Re: negate a word#?#?#?#?#? [In reply to] Can't Post

/<emp [^<>]*>(.*?)<\/emp>/

.* matches as many characters as possible
.*? matches as few characters as possible


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives