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

Re: [PBML] searching for user entered string

Expand Messages
  • Hudson T Clark
    Well what are you comparing them to? what are you searching in? you are searching for your name: my $name = wayne clements ; So you need to split it up... my
    Message 1 of 3 , May 2, 2003
      Well what are you comparing them to? what are you searching in? you are
      searching for your name:

      my $name = 'wayne clements';

      So you need to split it up...

      my @tmp = split / /, $name;

      Now @tmp should look like this:

      $tmp[0] = 'wayne';
      $tmp[1] = 'clements';

      And now the regex part, I don't understand what you want. Do you want to
      have regex return true if the word 'wayne' and 'clements' is anywhere in
      the file and any number of times? Do you want it to ONLY be true if each
      word appears ONLY once? You should check out perlre it has information on
      the perl regex but thats what you are going to be doing afte rwhat I show
      above... I just am not clear what regex you need. =P

      Plus go read the perlre page it will help you understand and you can
      figure this out on your own.

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.