Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: pattern sequence dispersed within text

by remiah (Hermit)
on Oct 01, 2012 at 14:42 UTC ( #996670=note: print w/replies, xml ) Need Help??

in reply to pattern sequence dispersed within text

hello. How about like this ?

use warnings; use strict; my $words = 'xxxhexxxxxxxx xle xxnxle nxxx xxnxxx xnxxhexx nxxxxx xlex +xxxxx nxnx xxxx'; my $string='helen'; print "string=$string\n"; print "words=$words\n"; my @other_stuff = split (/\s+/, $words); my @pairs = $string =~ /..?/sg; my $target=$pairs[0]; my $idx=0; while ($words =~ /(\b\w*?$target\w*?\b)/g ){ print "target=$target,matched=$1\n"; $idx++; $idx=0 if $idx > $#pairs; $target = $pairs[$idx]; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996670]
[pryrt]: stevieb: going thru cblast to get caught up, I see that strawberry fixed their download hashes. Fast turnaround on that fix. :-)
[pryrt]: Are you going to tie the berrybrew expected hashes to their releases.json to keep it always up-to-date?

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2017-03-30 13:17 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (357 votes). Check out past polls.