RSS SubjectsBlogs about "Regular Expression"

Regular Expression

Regular Expression Analysis using C # documents (updated)
2008-05-31 10:01:00
Regular Expression Analysis using C # documents (Updated) Jack H Hansen [2004-07-28] Keywords C # Regular Expression (Regular Expression) Syntax High1 Vote(s)
By: JeQQ it
Ip address validation in PHP using regular expression
2008-04-18 19:14:00
If you don’t know how to validate the IP address format in PHP, then you are in the right place.I’ll show you here how to validate the IP address using regular expression in PHP. SHARETHIS.addEntry( { title: "Ip address validation in PHP using regular expression", url: "http://roshanbh.com.np/2008/04-/ip-address-validation-php.html-" } );
North American phone number format validation using Regular expression in P
2008-02-08 11:06:00
Last day i saw that one of my friend looking for the validation script in PHP which post the phone no (number) of USA from the text box and wanted to validate it from PHP in the following format. SHARETHIS.addEntry( { title: "North American phone number format validation using Regular expression in PHP", url: "http://roshanbh.com.np/2008/02-/phone-number-validation-php-re-gular-expression.html" } );
American phone number validation using Regular expression in PHP
2008-02-08 11:06:00
Last day i saw that one of my friend looking for the validation script in PHP which post the phone no (number) of USA from the text box and wanted to validate it from PHP in the following format. SHARETHIS.addEntry( { title: "American phone number validation using Regular expression in PHP", url: "http://roshanbh.com.np/2008/02-/phone-number-validation-php.ht-ml" } );
Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PH
2008-01-01 10:56:00
Book DescriptionThis handy little book offers programmers a complete overview of the syntax and semantics of regular expressions that are at the heart of every text-processing application. Ideal as a quick reference, Regular Expression Pocket Reference covers the regular expression APIs for Perl 5.8, Ruby (including some upcoming 1.9 features), Java, PHP, .NET and C#, Python, vi, JavaScript, and the PCRE regular expression libraries.This concise and easy-to-use reference puts a very powerful tool for manipulating text and data right at your fingertips. Composed of a mixture of symbols and text, regular expressions can be an outlet for creativity, for brilliant programming, and for the elegant solution. Regular Expression Pocket Reference offers an introduction to regular expressions, pattern matching, metacharacters, modes and constructs, and then provides separate sections for each of the language APIs, with complete regex listings including: Supported metacharacters for each langu...
Regular Expression Tester
2007-12-23 17:20:00
This is a simple Regular Expression Tester.Imports System.Text.RegularExpressionsP-ublic Class Form1 Private Function TestRegularExpression(ByVal TestValue As Object, ByVal TestPattern As String) As Boolean TestRegularExpression = False If Regex.IsMatch(TestValue, TestPattern) Then TestRegularExpression = True Else TestRegularExpression = False End If Return TestRegularExpression End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Ans As Boolean = False Try Ans = TestRegularExpression(TextBox2.-Text.ToString().Trim(), TextBox1.Text.ToString().Trim()-) If Ans = True Then MessageBox.Show("Correct", "Regular Expressions", MessageBoxButtons.OK, MessageBoxIcon.Information) Else MessageBox.Show("Not Correct", "Regular Expressions", MessageBoxButtons.OK, MessageBoxIcon.Exclamation...
By: Open Blog
Regular Expression Bikin Saya Bingung
2007-11-04 04:00:00
Beberapa hari ini saya sedang mencoba update sistem dari kembaran.co.nr. Karena sebelumnya kalo daftar masih manual dengan cara mengirim form ke email saya karena tidak ada form pendaftaran online. Dengan bertambahnya kontributor dari aggregator blog STT Telkom ini, yah saya terpaksa membuat form online ini. Capek juga kalo harus update manual tiap kali ada kontributor ...
A block of text to use as input to the regular expression matcher
2007-06-04 12:12:00
// : c12:TheReplacements.java // From 'Thinking in Java, 3rd ed.' (c) Bruce Eckel 2002 // www.BruceEckel.com. See copyright notice in CopyRight.txt. import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import
Using a Non-Capturing Group in a Regular Expression
2007-05-18 06:35:00
By default, a group captures text (see Capturing Text in a Group in a Regular Expression). In some cases, a group is needed but there is no need to capture the text. A non-capturing group should be used to improve performance. A non-capturing group starts with (?:. String inputStr = "abbabcd"; String patternStr = "(a(?:b*))+(c*)"; // (?:b*) is a non-capturing group // Compile and use regular expression Pattern pattern = Pattern.compile(patternStr); Matcher matcher = pattern.matcher(inputStr); boolean matchFound = matcher.find(); if (matchFound) { // Get all groups for this match for (int i=0; i String groupStr = matcher.group(i); } // group 0: abbabc // group 1: ab // group 2: c }
Capturing Text in a Group in a Regular Expression
2007-05-18 06:32:00
A group is a pair of parentheses used to group subpatterns. For example, h(a|i)t matches hat or hit. A group also captures the matching text within the parentheses. For example, input: abbc pattern: a(b*)ccauses the substring bb to be captured by the group (b*). A pattern can have more than one group and the groups can be nested. For example, pattern: (a(b*))+(c*)contains three groups: group 1: (a(b*)) group 2: (b*) group 3: (c*)The groups are numbered from left to right, outside to inside. There is an implicit group 0, which contains the entire match. Here is an example of what is captured in groups. Notice that group 1 was applied twice, once to the input abb and then to the input ab. Only the most recent match is captured. Note that when using * on a group and the group matches zero times, the group will not be cleared. In particular, it will hold the most recently captured text. For example, input: aba pattern: (a(b)*)+ group 0: aba group 1:...
Javascript Regular Expression Validator
2007-05-17 11:44:00
Sponsored reviewJavascript Regular Expression Validator is a webtool designed to help programmer in validating and testing their Regular Expression.Find an error in Regular Expression can be very hard (especially if the string is a complex one ahd is integrated into a big javascript code) and can cost so much time. Surely is more useful to test it before insert into code and watch results in real time.An example? This Regular Expression can determine if a string inserted in a field box is a regular ip address. As you can see, it's not so simple to determine if it's right, but try to cup and paste into Javascript Regular Expression Validator and try different ip in the test boxes.^((25[0-5]|2[0-4][0-9]|1[-0-9]{2}|[0-9]{1,2}).){3}(25[0-5-]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1-,2})$If the expression is well written and the ip address is a valid one, the corresponding test field will be green. On contrary, red.The Javascript Regular Expression Validator is a product of Net Shift media, a pro...
Regular Expression Search Program Example code
2007-05-16 08:45:00
This example demonstrates how to use a regular expression to find matches in a string. import java.util.regex.*; public class BasicMatch { public static void main(String[] args) { // Compile regular expression String patternStr = "b"; Pattern pattern = Pattern.compile(patternStr); // Determine if pattern exists in input CharSequence inputStr = "a b c b"; Matcher matcher = pattern.matcher(inputStr); boolean matchFound = matcher.find(); // true // Get matching string String match = matcher.group(); // b // Get indices of matching string int start = matcher.start(); // 2 int end = matcher.end(); // 3 // the end is index of the last matching character + 1 // Find the next occurrence matchFound = matcher.find(); // true } }
Regular Expression Tool and Library
2007-05-15 07:41:00
Sponsored reviewRegular Expression Tool and LibraryIf you have worked on Unix system, or you are a javascript programmer, you know what is a Regular Expression: a string that describes or match a set of strings, according with some defined syntax rules. Normally Regular Expression are used for string manipulation (also advanced text editor uses them): for example, if you want to search into a paragraph the therm Re at beginning of every words, you should use the expression /bre (/b means word break).Regular expression are also used, in programming languages, to permits, on certain form or input box over the net, to insert only particular value (email address, defined file extension, a date, etc). But regular expression Syntax is not so simple and is very simple to make error especially if you use them inside a javascript program.Net Shift Media have created a very useful tool that works for us and solve this problem (really fundamental for developers wants to test and write regu...
Parsing Character-Separated Data with a Regular Expression
2007-05-06 04:45:00
A line from a flat-file is typically formatted using a separator character to separate the fields. If the separator is simply a comma, tab, or single character, the StringTokenizer class can be used to parse the line into fields. If the separator is more complex (e.g., a space after a comma), a regular expression is needed. String.split() conveniently parses a line using a regular expression to specify the separator.String.split() returns only the nondelimiter strings. To obtain the delimiter strings, see Parsing a String into Tokens Using a Regular Expression.Note: The StringTokenizer does not conveniently handle empty fields properly. For example, given the line a,,b, rather than return three fields (the second being empty), the StringTokenizer returns two fields, discarding the empty field. String.split() properly handles empty fields.// Parse a comma-separated stringString inputStr = "a,,b";String patternStr = ",";String[] fields = inputStr.split(patternStr);// ["a", "", "b"]// ...
Parsing a String into Tokens Using a Regular Expression
2007-05-06 04:43:00
This example implements a tokenizer that uses regular expressions. The use of this tokenizer is similar to the StringTokenizer class in that you use it like an iterator to extract the tokens. CharSequence inputStr = "a 1 2 b c 3 4"; String patternStr = "[a-z]"; // Set to false if only the tokens that match the pattern are to be returned. // If true, the text between matching tokens are also returned. boolean returnDelims = true; // Create the tokenizer Iterator tokenizer = new RETokenizer(inputStr, patternStr, returnDelims); // Get the tokens (and delimiters) for (; tokenizer.hasNext(); ) { String tokenOrDelim = (String)tokenizer.next(); } // "", "a", " 1 2 ", "b", " ", "c" class RETokenizer implements Iterator { // Holds the original input to search for tokens private CharSequence input; // Used to find tokens private Matcher matcher; // If true, the String between tokens are retu...
The power of Regular Expressions
2007-05-04 23:11:00
Regular expressions are strings that are used to match a set of strings, according to certain syntax rules. You can use them in many places, so it’s worth to learn it. For example, you can use it in Open Office or Total Commander (when searching a file). Regular expressions, called also RegExp, are available in ...
The power of Regular Expressions
2007-05-04 23:11:00
Regular expressions are strings that are used to match a set of strings, according to certain syntax rules. You can use them in many places, so it’s worth to learn it. For example, you can use it in Open Office or Total Commander (when searching a file). Regular expressions, called also RegExp, are available in ...
Regular Expression Replace in SQL 2005 (via the CLR)
2007-04-27 22:20:00
I had to do some data clean up the other day, and really needed some regular expression replacements to do the job. Since .NET has a great RegularExpressions namespace, and since SQL 2005 allows you to integrate .NET CLR functions in your T-SQL code, I thought I'd go ahead and experiment with creating a RegExReplace() function. read more...
Regular Expression Development Tools
2007-03-29 21:06:00
Since ModSecurity is based on regular expressions, a lot of rule creation requires developing and testing regular expressions. Therefore I looked for a tool that can be used to test regular expressions for validity and accuracy before using the regular expression in a ModSecurity rule. I found two free tools that let you do that: read more
Tcl Rules the Roost on Regular Expressions
2007-03-07 06:06:00
Tcl doesn't enjoy nearly as much popularity as Perl. Even though Perl is considered the scripting language of choice for doing regular expression processing on text, apparently Tcl beats Perl quite handily as far as speed of regular processing is concerned. The regex-dna benchark that is particularly sensitive to the speed of processing of RE's is good demonstration of Tcl's prowess in regular
Regular Expression Test Tool
1999-11-30 01:00:00
I’ve used this web based regular expression test tool a couple of times over the last day or so. While I don’t normally struggle with regular expressions, this tool has still come in handy; it has saved me from the “code it and cross your fingers” approach I normally take. This is a great tool for anyone who works with PHP, especially as the service uses PHP regular expression functions as a base for its operations. URL: http://www.solmetra.lt/scripts/-regex/
44462 blogs in the directory.
Statistics resets every week.


Contact | About
© Blog Toplist 2008 - Supported by Web Catalog - SEO by FeWorks
eXTReMe Tracker