garyed Posted March 14 Share Posted March 14 I've been trying to find some sort of tutorial on how to come up with search patterns for a function like preg_match. I was hoping someone here could point me to a site with a tutorial so I don't have to do a search every time I need to find a particular pattern. I don't need any specific search pattern right now but it's frustrating not having a clue on how to come up with one. Quote Link to comment https://forums.phpfreaks.com/topic/327009-using-patterns-in-preg_match/ Share on other sites More sharing options...
maxxd Posted March 14 Share Posted March 14 I'm not awesome with RegEx in general, but I typically use https://regexr.com/ as a playground with decent documentation. Quote Link to comment https://forums.phpfreaks.com/topic/327009-using-patterns-in-preg_match/#findComment-1651365 Share on other sites More sharing options...
Solution garyed Posted March 14 Author Solution Share Posted March 14 10 hours ago, maxxd said: I'm not awesome with RegEx in general, but I typically use https://regexr.com/ as a playground with decent documentation. Thanks, that's exactly what I needed. I thought I had posted in the wrong forum because I had no idea what REGEX was or meant. In all the years I've been playing around with PHP, I hardly ever used regular expressions & I didn't even know that is what they were called either. Quote Link to comment https://forums.phpfreaks.com/topic/327009-using-patterns-in-preg_match/#findComment-1651379 Share on other sites More sharing options...
maxxd Posted March 14 Share Posted March 14 It's a deep dive into nerdom, but they are handy to at least recognize. Quote Link to comment https://forums.phpfreaks.com/topic/327009-using-patterns-in-preg_match/#findComment-1651404 Share on other sites More sharing options...
gizmola Posted March 28 Share Posted March 28 On 3/13/2025 at 8:43 PM, maxxd said: I'm not awesome with RegEx in general, but I typically use https://regexr.com/ as a playground with decent documentation. I do like the site, mainly for the Tests Tab. It allows you to create a number of test cases, which is invaluable when you're designing a new regex. Another site I also use is: https://regex101.com/ I think the help is a little bit better on this site, as it has a built in cheat sheet to the right of the site. Quote Link to comment https://forums.phpfreaks.com/topic/327009-using-patterns-in-preg_match/#findComment-1652315 Share on other sites More sharing options...
maxxd Posted March 28 Share Posted March 28 One of my co-workers swears by regex101, and it's very good - I think I just met regexr.com first and got used to it. Highly recommend checking out both. 1 Quote Link to comment https://forums.phpfreaks.com/topic/327009-using-patterns-in-preg_match/#findComment-1652318 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.