Matt's Tech HOWTO's

Matt Feenstra is an Architect and Developer, living and working in Palm Desert, CA

Sunday, April 28, 2019

Ruby - Check for a regexp in a file



True/False

File.readlines(text_filename).grep(/myRegexp/).any?



Posted by matt at 6:28 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2023 (1)
    • ►  January (1)
  • ►  2022 (4)
    • ►  April (2)
    • ►  January (2)
  • ►  2020 (4)
    • ►  May (1)
    • ►  April (1)
    • ►  March (2)
  • ▼  2019 (10)
    • ►  July (1)
    • ►  June (2)
    • ►  May (2)
    • ▼  April (3)
      • Ruby - Check for a regexp in a file
      • An even better PS1
      • Ruby: Best way to boolean grep for a string contai...
    • ►  February (2)
  • ►  2016 (9)
    • ►  December (2)
    • ►  November (1)
    • ►  September (1)
    • ►  July (2)
    • ►  April (3)
  • ►  2015 (1)
    • ►  December (1)
  • ►  2014 (2)
    • ►  March (1)
    • ►  January (1)
  • ►  2013 (14)
    • ►  November (1)
    • ►  September (1)
    • ►  June (3)
    • ►  April (3)
    • ►  March (6)

About Me

matt
View my complete profile
Awesome Inc. theme. Powered by Blogger.