AWK: pattern and actions
We write action in curly braces. But pattern can be written outside. Like; Syntax pattern { action } Example awk 'NR==52 {print $0;}' For example you want to remove all spaces & tabs from all...
View ArticleRegular Expression, an introduction with full of examples
Let’s search txt files in a folder. If you are in widows OS then you will open search and will type ‘*.txt’. If you are using unix then you’ll use ‘ls *.txt’. ‘*’ is commonly used regular expression’s...
View ArticleTest Regular expressions online, save time and effort
If you are having internet and less time to build any application for testing Regular expressions then you can go for online tester. You just need to copy paste your contents. Write appropriate regular...
View ArticleHow to test Regular expression across the programming languages?
Prerequisite Regular expression, in introduction with full of example There are various flavours of Regular Expressions. All the flavours are 80% common. Some languages provide more elements, functions...
View ArticleRegular Expressions: Common elements part 1
If you find yourself weak in regular expression then complete this article patiently. But never forget to read Regular Expression, an introduction with full of examples. Otherwise this article will...
View ArticleRegular Expressions: Common elements part 2 (Range Search)
I had covered following components in last chapter of common elements ^(Start), $(End), .(Any char), *( zero or more occurrences), +( one or more occurrences) and ?( zero or one occurrences) Range...
View ArticleHow to remove or extract all hyperlinks from a web page using regular expression
Example Text: < a href="http://article-stack.com">article-stack< /a> < a href="http://article-stack.com">article-stack< /a> < a...
View ArticleHow to extract website URL using Regular Expression
String RE = "http:.*\\.[a-zA-Z0-9]{2,4}"; Regex r = new Regex(RE); : Test string 1: r.search("I am maintaining http:\\article-stack.com. This will help you to learn."); Output:...
View ArticleHow to remove multiple blank lines from a document in 2 minutes
This is very small trick I tried yesterday while creating a PDF file from a document file containing one blank line after a line containing text. Well!! If you already had read my article about regular...
View Article
More Pages to Explore .....