[baltimorepm] checking in - DCBPW, April, RegEx question answered

Dawn Wallis wallisds at gmail.com
Fri Mar 23 10:32:23 PDT 2012


Hi Group,

*Item 1 - Go to DCBPW on April 14, 2012*
I've been staying very busy in my efforts to help organize the DCBPW event
coming up on April 14, 2012. Hopefully you all have registered for this one
day event by now! If not go to www.dcbpw.org and sign up.
*
Item 2 - April's meeting and meeting space*
Our April meeting is still TBD, and I might postpone it to May since DCBPW
is in April. What are your thoughts on this? Would you like to still meet
in April even if it is just socially? or would you like to have the option
for a third Thursday meeting in April (like we do every month)? I'm still
working on getting meeting space for our group, any suggestions are welcome.
*
Item 3 - Follow up from March's meeting -- "**capturing multiple matches in
regex without loop*ing"
Earlier today I was talking with a friend who showed me an interesting, and
sort of obvious solution to a question presented at our last meeting.

[paraphrasing]"if you are looking for every match in a string and using 'g'
how do you capture all the results without knowing how many to expect?"

Many answers were posed from "I don't know" to "use a loop". But this is a
simple solution that does not involve a loop for capturing purposes anyway:
Use assignment.

See my example:

my $str = "Stuffed animal 7878997! stuffing stuffy foo face";
my @matches = $str =~/(stuff)/g;
print $#matches +1;  #+1 for human readable


As you can see there is always more than one way to do it! This is just an
example showing how many matches occur, but you can see from this one
example much more could build from this.

Well don't be strangers. Reply with more tips or questions and your
thoughts about meeting in April!!!


Thanks!

Dawn
--
Dawn Wallis
Baltimore.pm
directly wallisds at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/baltimore-pm/attachments/20120323/88c15164/attachment.html>


More information about the Baltimore-pm mailing list