Hi, I'm doing a quick modification to an existing script and I don't understand too much how wildcards work in PHP so I'm a bit stalled trying to do a preg_replace. What I need to do is replace something like <tag asadsadasd> word1 adasdadsadas word2 adasdasd asdasddasd = word3 aasdassadas </tag> but replacing the words found within that portion of text without going into multiple iterations of preg_replace for each word. I've found some examples but they don't explain when to use / [ and other special characters for doing wildcards. Thanks for your help =)
This seems to be a sample text. Can you maybe post a real example? And also, do you just want to replace "word1", "word2", "word3"? Or all text between the tags?
Well, last night I spent some time researching about regular expressions and I'm getting the grip of it. Thanks for your help