khevamann / rn-responsive-styles

Responsive styles for react-native and react-native-web
MIT License
39 stars 3 forks source link

Invalid Regex #8

Closed khevamann closed 2 years ago

khevamann commented 2 years ago

Issue where regex wasn't checking for the end of the text so a class like text would include styles for a class of textbold

Thanks to @EthanHermsey for catching this!

closes #7

EthanHermsey commented 2 years ago

Awesome! Fixed with just one character, I love that :p I've added it back into my project and it looks very good!

I should really look into regex a bit more.. It's very powerful and I feel like I should've been able to fix this..

khevamann commented 2 years ago

@EthanHermsey Yeah its amazing what you can do with RegEx. I pretty much just google search everything I am trying to accomplish and test it out here https://regex101.com/. Makes it easy to find why it was matching both styles and add in the fix $ which matches the end of the string

EthanHermsey commented 2 years ago

That's a great resource, thanks!