<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Regex on Amit Agarwal Linux Blog</title>
    <link>/tags/regex/</link>
    <description>Recent content in Regex on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Fri, 04 Jun 2010 02:06:46 +0000</lastBuildDate>
    
	<atom:link href="/tags/regex/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>redet – build regular expression (regex) for any program.</title>
      <link>/2010/06/04/redet-build-regular-expression-regex-for-any-program/</link>
      <pubDate>Fri, 04 Jun 2010 02:06:46 +0000</pubDate>
      
      <guid>/2010/06/04/redet-build-regular-expression-regex-for-any-program/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Even if someone is  a regex guru there are times that people get confused with some regular expression and want to either test it out or want to some help. Behold, redet is here. Lets start with installing redet:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo yum install redet&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once you are done with installation, just run it with redet. First you need to load the sample data, select your program and then enter the regex to test it out. Here are some screenshots to get you started.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Detecting URLs in a Block of Text</title>
      <link>/2010/03/31/detecting-urls-in-a-block-of-text/</link>
      <pubDate>Wed, 31 Mar 2010 07:27:21 +0000</pubDate>
      
      <guid>/2010/03/31/detecting-urls-in-a-block-of-text/</guid>
      <description>&lt;p&gt;Jan Goyvaerts on &amp;lt;a href=&amp;quot;http://www.regex-guru.info/2008/11/detecting-urls-in-a-block-of-text/&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;Detecting URLs in a Block of Text&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In his blog post &amp;lt;a href=&amp;quot;http://www.codinghorror.com/blog/archives/001181.html&amp;quot;&amp;gt;The Problem with URLs&lt;/a&gt; points out some of the issues with trying to detect URLs in a larger body of text using a regular expression.&lt;/p&gt;
&lt;p&gt;The short answer is that it &lt;strong&gt;can’t be done&lt;/strong&gt;. Pretty much &lt;strong&gt;any character is valid in URLs&lt;/strong&gt;. The very simplistic &amp;lt;span class=&amp;quot;regex&amp;quot;&amp;gt;\bhttp://\S+&lt;/span&gt; not only fails to differentiate between punctuation that’s part of the URL, and punctuation used to quote the URL. It also fails to match URLs with spaces in them. Yes, spaces are valid in URLs, and I’ve encountered quite a few web sites that use them over the years. It also forgets other protocols, such as https.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>grep -v with multiple patterns.</title>
      <link>/2010/01/25/grep-v-with-multiple-patterns/</link>
      <pubDate>Mon, 25 Jan 2010 15:10:33 +0000</pubDate>
      
      <guid>/2010/01/25/grep-v-with-multiple-patterns/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;&lt;tt&gt;$ sed &#39;/test/{/error|critical|warning/d}&#39; somefile&lt;/tt&gt; If you wanted to do all in one command, you could go w/ sed instead&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;a href=&amp;quot;http://www.commandlinefu.com/commands/view/3882/grep-v-with-multiple-patterns.&amp;quot;&amp;gt;View this command to comment, vote or add to favourites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&amp;lt;a href=&amp;quot;http://feeds2.feedburner.com/commands/by/pipping&amp;quot;&amp;gt;View all commands by &lt;/a&gt;&lt;strong&gt;&amp;lt;a href=&amp;quot;http://feeds2.feedburner.com/commands/by/pipping&amp;quot;&amp;gt;pipping&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://www.commandlinefu.com&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg&amp;quot; alt=&amp;quot;&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;by David Winterbottom (&amp;lt;a href=&amp;quot;http://codeinthehole.com&amp;quot;&amp;gt;codeinthehole.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;http://feedads.g.doubleclick.net/~a/J5B2Z5VTSlqhmd-2YMQ4ndmAu4U/0/da&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~a/J5B2Z5VTSlqhmd-2YMQ4ndmAu4U/0/di&amp;quot; alt=&amp;quot;&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/a&gt;&lt;br&gt;
&amp;lt;a href=&amp;quot;http://feedads.g.doubleclick.net/~a/J5B2Z5VTSlqhmd-2YMQ4ndmAu4U/1/da&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~a/J5B2Z5VTSlqhmd-2YMQ4ndmAu4U/1/di&amp;quot; alt=&amp;quot;&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;img src=&amp;quot;http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~r/Command-line-fu/~4/LjKzo7FpzDU&amp;quot; alt=&amp;quot;&amp;quot; width=&amp;quot;1&amp;quot; height=&amp;quot;1&amp;quot; align=&amp;quot;bottom&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;URL: &amp;lt;a href=&amp;quot;http://feedproxy.google.com/~r/Command-line-fu/~3/LjKzo7FpzDU/grep-v-with-multiple-patterns.&amp;quot;&amp;gt;http://feedproxy.google.com/~r/Command-line-fu/~3/LjKzo7FpzDU/grep-v-with-multiple-patterns.&lt;/a&gt;&amp;lt;h6 class=&amp;quot;zemanta-related-title&amp;quot; style=&amp;quot;font-size: 1em;&amp;quot;&amp;gt;Related articles by Zemanta&lt;/h6&gt; &amp;lt;ul class=&amp;quot;zemanta-article-ul&amp;quot;&amp;gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.seroundtable.com/archives/020935.html&amp;quot;&amp;gt;Google&amp;amp;#8217;s &amp;amp;#8221;Show More Results&amp;amp;#8221; Plus Box&lt;/a&gt; (seroundtable.com)&lt;/li&gt; &amp;lt;li class=&amp;quot;zemanta-article-ul-li&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://www.macworld.com/article/143351/2009/10/netprocesses.html?lsrc=rss_main&amp;quot;&amp;gt;See which processes are using the Internet&lt;/a&gt; (macworld.com)&lt;/li&gt; &lt;/ul&gt; &amp;lt;div class=&amp;quot;zemanta-pixie&amp;quot; style=&amp;quot;margin-top: 10px; height: 15px;&amp;quot;&amp;gt;&amp;lt;a class=&amp;quot;zemanta-pixie-a&amp;quot; title=&amp;quot;Reblog this post [with Zemanta]&amp;quot; href=&amp;quot;http://reblog.zemanta.com/zemified/cc60245b-7397-4d48-83b2-7bfb345ae7a9/&amp;quot;&amp;gt;&amp;lt;img class=&amp;quot;zemanta-pixie-img&amp;quot; style=&amp;quot;border: medium none; float: right;&amp;quot; src=&amp;quot;http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e20.png&amp;quot; alt=&amp;quot;Reblog this post [with Zemanta]&amp;quot; /&amp;gt;&lt;/a&gt;&amp;lt;span class=&amp;quot;zem-script more-related pretty-attribution&amp;quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
