Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Kieran Barker15,028 Points
How can I match 'ladybug' and 'fading rug!' in RegEx only using the '?', '.' or '' special characters?
Steven Parker224,849 Points
With regex, there will usually be more than one way to create a match. Here's one example using only ? and :
And here's another one that is more concise (and less exclusive) using only . and ?:
Greg Witt27,132 Points
This one was pretty difficult! Thanks for the help Steven. I kept getting the
ing rug! but could get anything else preceding that. Thanks!
Ozaveshe BalogunFront End Web Development Techdegree Student 20,187 Points
I know this is old but this my own solution:
[lf]ad[yi][bn][ug] ?r?u?g!? or
f?a?d?.....ug!? or .
ad.n?g? ?.ug!? or