Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Bodie Ponder
    Bodie Ponder
    2,808 Points

    what am I missing? Im on the last question.

    Posted February 8, 2022 9:53pm by Bodie Ponder
    Bodie Ponder
    2,808 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Terrance McGee
    Terrance McGee
    2,958 Points

    i dont know what im doing wrong

    Posted November 13, 2021 5:15pm by Terrance McGee
    Terrance McGee
    2,958 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Sinazo Nongena
    Sinazo Nongena
    2,517 Points

    Task 2 of 5 Read the contents of file_object into a new variable named data. May someone please read my code

    Posted September 29, 2020 3:12pm by Sinazo Nongena
    Sinazo Nongena
    2,517 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    2 Answers

  • Tim Gast
    Tim Gast
    7,624 Points

    when use the ()

    Posted October 31, 2019 11:41am by Tim Gast
    Tim Gast
    7,624 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Emily Strobl
    Emily Strobl
    5,429 Points

    What am i doing wrong

    Posted October 3, 2019 6:48pm by Emily Strobl
    Emily Strobl
    5,429 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Kudzanai Leroy Mapika
    Kudzanai Leroy Mapika
    3,912 Points

    Import re. Create an re.match() for the word "Four" in the data variable. Assign this to a new variable named first.

    Posted August 26, 2019 7:34am by Kudzanai Leroy Mapika
    Kudzanai Leroy Mapika
    3,912 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Mohammed Zvakavapano
    Mohammed Zvakavapano
    1,746 Points

    what code should i Use answer this question -- Use open() to load the file "basics.txt" into the variable file_object.

    Posted August 20, 2019 8:50am by Mohammed Zvakavapano
    Mohammed Zvakavapano
    1,746 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Mohammed Zvakavapano
    Mohammed Zvakavapano
    1,746 Points

    Use open() to load the file "basics.txt" into the variable file_object.

    Posted August 20, 2019 8:18am by Mohammed Zvakavapano
    Mohammed Zvakavapano
    1,746 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Fineen Davis
    Fineen Davis
    1,281 Points

    data variable appears to not contain the right information

    Posted June 12, 2019 10:58pm by Fineen Davis
    Fineen Davis
    1,281 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Dana Johnson
    Dana Johnson
    10,337 Points

    What is wrong with my code for question 4 of 5 not working - Here is my code: first = re.match(r'Four', data)

    Posted June 3, 2019 3:08pm by Dana Johnson
    Dana Johnson
    10,337 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    2 Answers

  • BLESSING TASHINGA GURENJE
    BLESSING TASHINGA GURENJE
    5,793 Points

    can you assist please

    Posted November 12, 2018 10:28pm by BLESSING TASHINGA GURENJE
    BLESSING TASHINGA GURENJE
    5,793 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Jeremy Millar
    PLUS
    Jeremy Millar
    Courses Plus Student 3,375 Points

    why does this not work?

    Posted October 11, 2018 6:25pm by Jeremy Millar
    Jeremy Millar
    Courses Plus Student 3,375 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Karen Shumate
    Karen Shumate
    13,579 Points

    Use open() to load the file "basics.txt" into the variable file_object.

    Posted September 15, 2018 3:32pm by Karen Shumate
    Karen Shumate
    13,579 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    2 Answers

  • Rafay Ahmed
    Rafay Ahmed
    956 Points

    I have a syntax error

    Posted July 15, 2018 2:28am by Rafay Ahmed
    Rafay Ahmed
    956 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Rafay Ahmed
    Rafay Ahmed
    956 Points

    Hi I have a syntax error as an indentation error

    Posted July 15, 2018 2:07am by Rafay Ahmed
    Rafay Ahmed
    956 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Shorayi Spencer Guzha
    Shorayi Spencer Guzha
    6,044 Points

    Regular expressions Task 3 of 5 closing file_object my solution seem to be correct but not pasing

    Posted April 2, 2018 7:12am by Shorayi Spencer Guzha
    Shorayi Spencer Guzha
    6,044 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Dominque Cox
    Dominque Cox
    15,362 Points

    What is wrong with my rile_object.close() line?

    Posted March 30, 2018 3:40pm by Dominque Cox
    Dominque Cox
    15,362 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    3 Answers

  • Avraham Shukron
    Avraham Shukron
    19,609 Points

    Closing a file in Python

    Posted March 30, 2018 9:47am by Avraham Shukron
    Avraham Shukron
    19,609 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Warren Gates
    Warren Gates
    17,401 Points

    Now close the file_object file so it isn't taking up memory.

    Posted March 30, 2018 4:46am by Warren Gates
    Warren Gates
    17,401 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    4 Answers

  • Cross Ender
    Cross Ender
    9,567 Points

    Here's another way to do it.

    Posted May 28, 2017 11:04pm by Cross Ender
    Cross Ender
    9,567 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    2 Answers

  • Hannah Trewern
    Hannah Trewern
    13,429 Points

    basics.py Task 4 of 5

    Posted March 29, 2017 9:24pm by Hannah Trewern
    Hannah Trewern
    13,429 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    3 Answers

  • Michael Blum
    Michael Blum
    254 Points

    Everytime I get to task 4 I get the same error : "It looks like Task 1 is no longer passing"... What should I do ?

    Posted March 15, 2017 4:29pm by Michael Blum
    Michael Blum
    254 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Kristine Saryan
    Kristine Saryan
    1,386 Points

    Why does it keep saying Task 1 is no longer passing when I try to do task 2. I haven't changed anything

    Posted March 2, 2017 11:37pm by Kristine Saryan
    Kristine Saryan
    1,386 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Russel Klueg
    Russel Klueg
    2,813 Points

    Python re.match() breaks Task 1

    Posted December 28, 2015 6:20pm by Russel Klueg
    Russel Klueg
    2,813 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • Amresh Venugopal
    Amresh Venugopal
    2,307 Points

    create a regex

    Posted September 14, 2015 8:00am by Amresh Venugopal
    Amresh Venugopal
    2,307 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    2 Answers

  • Rungano Matonda
    Rungano Matonda
    3,237 Points

    Regular expressions in Python Task 5 of 5

    Posted April 30, 2015 7:38am by Rungano Matonda
    Rungano Matonda
    3,237 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    2 Answers

  • sara oren
    sara oren
    1,798 Points

    Why isn't my answer going through?

    Posted March 29, 2015 7:20pm by sara oren
    sara oren
    1,798 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    2 Answers

  • Nyasha Chawanda
    Nyasha Chawanda
    7,946 Points

    using the re module

    Posted March 4, 2015 6:27am by Nyasha Chawanda
    Nyasha Chawanda
    7,946 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    1 Answer

  • MUZ140330 Simbarashe Chibgwe
    MUZ140330 Simbarashe Chibgwe
    2,825 Points

    Import re. Create an re.match() for the word "Four" in the data variable. Assign this to a new variable named first.

    Posted February 26, 2015 7:53am by MUZ140330 Simbarashe Chibgwe
    MUZ140330 Simbarashe Chibgwe
    2,825 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    2 Answers

  • Apus Wsoe
    Apus Wsoe
    7,555 Points

    Error`first` doesn't seem to be a regex match. Works in Preview first = r'Four' print(re.match(first, data))

    Posted January 5, 2015 6:07pm by Apus Wsoe
    Apus Wsoe
    7,555 Points
    • Python
    • Regular Expressions in Python
    • Introduction to Regular Expressions
    • The Basics

    4 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord