Loading...


Ask A Question?

 
 
 
 
 
 
Posted in Computers & Tech / Programming / Programming General / BASIC / Visual Basic (.NET)
Author: Jimmy89 Total-Replies: 4


Hi All, I am using Regular Expressions in VB.NET to find illegal filename characters in a string. The user enters and name, and it then saves the file with that name. I just need to make sure that the filename doesn't contain illegal filename characters. The characters are / \ : ? " < > | (is there any...

Wed Feb 20, 2008    Reply    New Discussion   
 

Posted in Computers & Tech / Programming
Author: FirefoxRocks Total-Replies: 9


In PHP and many other programming languages, I have heard of this powerful syntax called RegEx, or regular expressions. It allows you to find strings that match a certain pattern. I had to use a regex expression to search for a specific string of text within a block of text once, and someone told me to use a regular expression....

Sat Aug 2, 2008    Reply    New Discussion   
 
Posted in Astahost / Hosted Members Support / cPanel
Author: vujsa Total-Replies: 0


I'm so irritated with the amount of spam I get on the email accounts I have hosted at AstaHost. It isn't the servers fault that I get so much junk mail! It wouldn't be so bad but my junk mail filter on my home system doesn't scan IMAP accounts which I use since my email client won't separate POP3 accounts...

Mon Feb 18, 2008    Reply    New Discussion   
 

Posted in Computers & Tech / Programming / Programming General
Author: starscream Total-Replies: 1


I know that regex are language agnostic because of the wide areas where it can be used. I have used regeex in ruby on rails, python and now in php. I have found it very handy. I think like string operations they are also fast. Most of the string operations and regex are common. You just need regex in araes where string cant do the...

Wed Feb 15, 2012    Reply    New Discussion   
 
Posted in Computers & Tech / Programming / Scripting / PHP
Author: vujsa Total-Replies: 11


So I'm trying to learn how to pull useful content from a web page. Here's what I got so far:

CODE

<?php $filename = "http://www.forum500.com"; $html = file_get_contents($filename); /* **************************************************************** */ /*        ...

Wed Apr 13, 2005    Reply    New Discussion   
 
Posted in Computers & Tech / Networking
Author: pyost Total-Replies: 0


I am not particularly good when it comes to regular expressions and forming a .htaccess file, so I knew I would run into a problem sooner or later. At the moment, I am developing a simple PHP script for a game similar to NotPr0n. As I want it to be user-friendly, I have decided to use "rewritten" URLs instead of ...

Fri Aug 3, 2007    Reply    New Discussion   
 

Posted in Computers & Tech / Programming / Scripting / Perl & CGI
Author: mastercomputers Total-Replies: 14


I am just wondering what you would do to validate against an email address, basically I want to know what Regular Expression you would use to check for a valid format. I've seen so many different ways of doing it, some I can definitely say can produce wrong results, but I'm not saying mine is perfect either, basically I...

Sat Nov 27, 2004    Reply    New Discussion   
 
Posted in Computers & Tech / Programming / Programming General / C# .NET
Author: turbopowerdmaxsteel Total-Replies: 8


I have a hierarchy of functions represented as something like:- @BeforeText(@AfterText(@ReadURL('http://www.quotationspage.com/quote/1.html')@,'<dt>',True)@,'</dt>',True)@ Each of the functions follow the format @FunctionName(<ParamString>)@. The ParamString itself can be composed of a...

Mon Mar 24, 2008    Reply    New Discussion   
 
Posted in Computers & Tech / Internet and Websites
Author: mastercomputers Total-Replies: 8


This was the code taken from that link:

CODE

if(eregi('MSIE', $_SERVER['HTTP_USER_AGENT'])){ echo '<div> Bla Bla Bla your text explaining why people should switch to Firefox. </div>'; }
This is how I would write it:

CODE

...

Fri Feb 17, 2006    Reply    New Discussion   
 
Posted in Computers & Tech / Programming / Scripting / PHP
Author: vujsa Total-Replies: 9


I think the best and most common method is to use regular expressions. Using regular expressions allows you to match a wider variety of patterns. If you only use str_replace, then if the user makes a mistake in the BBC or the BBC contains something you weren't expecting, you could get a lot of errors. For example, here is...

Wed Aug 29, 2007    Reply    New Discussion   
 
Posted in Computers & Tech / Programming / Scripting / PHP
Author: vujsa Total-Replies: 3


Unless someone knows better than me, I think the solution will require some pattern matching using a regular expression. This will probably confuse you: http://us3.php.net/manual/en/reference.pcr...tern.syntax.php This is the example that best matches your situation: http://us3.php.net/manual/en/function.preg-match.php

QUOTE (http)

CODE

<?php...

Sun Aug 20, 2006    Reply    New Discussion   
 
Posted in Free Web Hosting / Hosting Support & Help
Author: pyost Total-Replies: 10


Just as turbopowerdmaxsteel said, .htaccess is all you need

CODE

RewriteEngine on RewriteRule ^directory/(.+)$ /directory/script.php?directory=$1
Regular expression, which are used in .htaccess files, might be confusing in the beginning, but they are an extremely powerful tool. ^directory/(.*)$ will match all...

Fri Oct 26, 2007    Reply    New Discussion   
 
Posted in Computers & Tech / Databases
Author: Quatrux Total-Replies: 3


I never learnt regular expressions myself, only the basic stuff which I usually don't need and always when I need to regexp, I first try to find something on the php.net site, but usually I just connect to irc.freenode.com and go to the #php where a lot of experienced people help you, really a good support channel for php...

Wed May 10, 2006    Reply    New Discussion   
 
Posted in Computers & Tech / Programming / Scripting / PHP
Author: Quatrux Total-Replies: 5


If you only want to allow A-Z,a-z,0-9 in the username, when you can make a check using regular expression, you really will find examples on php net comments of such functions like preg_replace() and preg_match(), another way to do it is by using ctype here: http://lt.php.net/ctype just check what you want to filter.

Fri May 25, 2007    Reply    New Discussion   
 
Posted in Computers & Tech / Programming / Scripting / PHP
Author: TavoxPeru Total-Replies: 7


While searching my pc for some code that i need i found this two php functions that you can use, the first one for generating your activation code and the second for validate email addresses. generatePassword(): With this function you can set the length and strength of the generated password.

CODE

<?php function...

Wed Aug 20, 2008    Reply    New Discussion   
 

Ask a Question (w/o registration) to get Quick Answers!


astaHost