Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old December 7th, 2000, 01:35 PM
extremeguy extremeguy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Dover, NH
Posts: 14 extremeguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 57 sec
Reputation Power: 0
How would I search for odd charecters such as: Ü, ê, §, ù, ƒ, Â, ö, ñ, ê, etc.

On my website I try to filter out "bad" words and asterick "*" them out, but the users are getting smarter using such charecters as the above.

Reply With Quote
  #2  
Old December 8th, 2000, 01:19 AM
Tydel Tydel is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 1 Tydel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Tydel
$message =~ s/[^W]/*/ig;

That would change all non-alphanumeric (a-z, A-Z, 0-9, underscores and spaces) to an asterix.

Reply With Quote
  #3  
Old December 8th, 2000, 09:10 AM
extremeguy extremeguy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Dover, NH
Posts: 14 extremeguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 57 sec
Reputation Power: 0
That would work, but I only want to asteric out certain words, ie: ****, bitch, *** hole, etc. I want to be able to leave things like: Thê §øù£ øƒ Ân Åñgê£ since it doen't contain swear words.

Reply With Quote
  #4  
Old December 8th, 2000, 03:52 PM
JonLed JonLed is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2000
Location: Indiana
Posts: 614 JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level)JonLed User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 h 49 m 49 sec
Reputation Power: 9
Heh, well to bad. You can't have a regular expression filter out bad words and odd characters at the same time (unless you can think of every possible combination of swear words with those characters.

Reply With Quote
  #5  
Old December 10th, 2000, 03:06 PM
extremeguy extremeguy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Dover, NH
Posts: 14 extremeguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 57 sec
Reputation Power: 0
Lets just say I wanted to filter out one particular word like: pÜssy (the one I am tring to filter out), how can I write a query to recognise this?

Reply With Quote
  #6  
Old December 10th, 2000, 03:30 PM
Pepe^ Pepe^ is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 0 Pepe^ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
This is what I do to remove unwanted words in variable:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
$FORM{'text'} =~ s/pÜssy//g;
$FORM{'text'} =~ s/www//g;
$FORM{'text'} =~ s/internet//g;
[/code]

Reply With Quote
  #7  
Old December 11th, 2000, 12:38 PM
extremeguy extremeguy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: Dover, NH
Posts: 14 extremeguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 57 sec
Reputation Power: 0
The problem is that
$FORM{'text'} =~ s/pÜssy/p****/g;
does not work. This is the way that I do search for "bad" swear words, but the "Ü" seems to mees things up.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > searching for odd charecters


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway