<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help Regarding Perl Regular Expression(Pattern Matching) in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863854#M98487</link>
    <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;An excellent tour and summmary of Perl regular expression syntax, can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://perldoc.perl.org/perlre.html" target="_blank"&gt;http://perldoc.perl.org/perlre.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;At it's end are additional references, including Jeffrey Friedl's "Mastering Regulare Expressions"  --- an outstanding book on the subject.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Sat, 16 Sep 2006 11:32:49 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2006-09-16T11:32:49Z</dc:date>
    <item>
      <title>Help Regarding Perl Regular Expression(Pattern Matching)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863852#M98485</link>
      <description>The expression is --&amp;gt;&lt;BR /&gt;&lt;BR /&gt;if($x =~ /$y/g) {&lt;BR /&gt;#where $x=41 and $y=424143&lt;BR /&gt;&lt;BR /&gt;Please tell me if the above expression will work ?&lt;BR /&gt;If not then how to match $x and $y ?</description>
      <pubDate>Sat, 16 Sep 2006 05:36:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863852#M98485</guid>
      <dc:creator>Pankaj Yadav_1</dc:creator>
      <dc:date>2006-09-16T05:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help Regarding Perl Regular Expression(Pattern Matching)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863853#M98486</link>
      <description>HI:&lt;BR /&gt;&lt;BR /&gt;If you are looking to see if the character string "41" held in $x exists in $y (anywhere) then:&lt;BR /&gt;&lt;BR /&gt;# perl -le '$x=41;$y=424143;if ($y =~ /$x/g) {print "ok"}'&lt;BR /&gt;&lt;BR /&gt;...will print "ok".&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Sat, 16 Sep 2006 11:19:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863853#M98486</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-09-16T11:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help Regarding Perl Regular Expression(Pattern Matching)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863854#M98487</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;An excellent tour and summmary of Perl regular expression syntax, can be found here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://perldoc.perl.org/perlre.html" target="_blank"&gt;http://perldoc.perl.org/perlre.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;At it's end are additional references, including Jeffrey Friedl's "Mastering Regulare Expressions"  --- an outstanding book on the subject.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 16 Sep 2006 11:32:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863854#M98487</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-09-16T11:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help Regarding Perl Regular Expression(Pattern Matching)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863855#M98488</link>
      <description>&lt;BR /&gt;Just to see whether a simple (non-wildcard) string is a substring of an other string you should NOT use a regular expression. &lt;BR /&gt;&lt;BR /&gt;Instead, use the 'index' function which is made specifically for that and processes more efficiently:&lt;BR /&gt;&lt;BR /&gt;Same example:&lt;BR /&gt;perl -le '$x=41;$y=424143;if (index($y,$x) &amp;gt;= 0 ) {print "ok"}'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(one of many) Online documentation:&lt;BR /&gt; #&lt;A href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_index" target="_blank"&gt;http://www.xav.com/perl/lib/Pod/perlfunc.html#item_index&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein van den Heuvel&lt;BR /&gt;HvdH Performance Consulting&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 16 Sep 2006 11:40:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863855#M98488</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-09-16T11:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help Regarding Perl Regular Expression(Pattern Matching)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863856#M98489</link>
      <description>And if that is the only thing and the only time you match that/a pattern in the target string, PLEASE drop the /g modifier, as it has many side effects.&lt;BR /&gt;The /g modifier is for global matches, and returns more matches if available, changing the context if needed. It also fiddles with global variables and string attributes, so you can match on from the last position with \G metacharacters. The /g modifier is related to the /c modifier.&lt;BR /&gt;&lt;BR /&gt;# perldoc perlretut&lt;BR /&gt;&lt;BR /&gt;About 52% or 1188 lines down is the explanation of /g and /c&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Sun, 17 Sep 2006 04:11:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863856#M98489</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2006-09-17T04:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help Regarding Perl Regular Expression(Pattern Matching)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863857#M98490</link>
      <description>I got the solution by &lt;BR /&gt;perl -le '$x=41;$y=424143;if (index($y,$x) &amp;gt;= 0 ) {print "ok"}'&lt;BR /&gt;&lt;BR /&gt;which is suggested by Hein van Den.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot to all of you.</description>
      <pubDate>Tue, 19 Sep 2006 06:30:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-regarding-perl-regular-expression-pattern-matching/m-p/3863857#M98490</guid>
      <dc:creator>Pankaj Yadav_1</dc:creator>
      <dc:date>2006-09-19T06:30:57Z</dc:date>
    </item>
  </channel>
</rss>

