Loading ...
Sorry, an error occurred while loading the content.
 

[PBML] Re: I need to write a Regular Expression

Expand Messages
  • andrewsfulton
    Hello Shawn, That makes sense. It does work on a Perl validator: http://sqa.fyicenter.com/Online_Test_Tools/Test_Regular_Expression_Match_Pattern.php I thought
    Message 1 of 10 , Nov 29, 2011
      Hello Shawn,

      That makes sense.

      It does work on a Perl validator: http://sqa.fyicenter.com/Online_Test_Tools/Test_Regular_Expression_Match_Pattern.php

      I thought I needed this in Perl, My companies site has a validator as well and it did not catch the phrase. I wonder if it is actually using Java.

      If its not to much to ask, what would the Java expression look like?

      --- In perl-beginner@yahoogroups.com, Shawn H Corey <shawnhcorey@...> wrote:
      >
      > On 11-11-29 10:53 AM, andrewsfulton wrote:
      > > I'm not able to get this expression: /(?:Account|Member) (?:\#|Number)/
      > > to work.
      > >
      > > The validation tool I used is: http://www.sweeting.org/mark/html/revalid.php
      > >
      > > Am I doing something wrong?
      >
      > You are using a Javascript regex evaluator on a Perl regex. It works in
      > Perl:
      >
      > #!/usr/bin/perl
      >
      > use strict;
      > use warnings;
      >
      > while( <DATA> ){
      > if( /(?:Account|Member) (?:\#|Number)/ ){
      > print "matched: $_";
      > }else{
      > print "not: $_";
      > }
      > }
      >
      > __DATA__
      > Account Number
      > Account #
      > Member Number
      > Member #
      > this is a test
      >
      >
      >
      > --
      > Just my 0.00000002 million dollars worth,
      > Shawn
      >
      > Programming is as much about organization and communication
      > as it is about coding.
      >
      > Never give up your dreams. Give up your goals, plans,
      > strategy, tactics, and anything that's not working but never
      > give up your dreams.
      >
    • Shawn H Corey
      ... Don t know; don t use Java. Or do you mean Javascript? -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and
      Message 2 of 10 , Nov 29, 2011
        On 11-11-29 11:35 AM, andrewsfulton wrote:
        > If its not to much to ask, what would the Java expression look like?

        Don't know; don't use Java. Or do you mean Javascript?


        --
        Just my 0.00000002 million dollars worth,
        Shawn

        Programming is as much about organization and communication
        as it is about coding.

        Never give up your dreams. Give up your goals, plans,
        strategy, tactics, and anything that's not working but never
        give up your dreams.
      • andrewsfulton
        Sorry, i meant Javascript
        Message 3 of 10 , Nov 29, 2011
          Sorry, i meant Javascript

          --- In perl-beginner@yahoogroups.com, Shawn H Corey <shawnhcorey@...> wrote:
          >
          > On 11-11-29 11:35 AM, andrewsfulton wrote:
          > > If its not to much to ask, what would the Java expression look like?
          >
          > Don't know; don't use Java. Or do you mean Javascript?
          >
          >
          > --
          > Just my 0.00000002 million dollars worth,
          > Shawn
          >
          > Programming is as much about organization and communication
          > as it is about coding.
          >
          > Never give up your dreams. Give up your goals, plans,
          > strategy, tactics, and anything that's not working but never
          > give up your dreams.
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.