Quantcast
Channel: article-stack » Regular Expression
Browsing all 9 articles
Browse latest View live

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 Article



Regular 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 Article

Test 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 Article

How 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 Article

Regular 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 Article


Regular 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 Article

How 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 Article

How to extract website URL using Regular Expression

String RE = &quot;http:.*\\.[a-zA-Z0-9]{2,4}&quot;; 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 Article


How 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

Browsing all 9 articles
Browse latest View live




Latest Images