I'm using a little script to write some information to a file from what a bot says. The thing is, the bot may announce stuff like "faq-s" and i want to replace it with "faqs" when writing it to the file..
Here's the little code i use:
I've tried playing around with $replace($1-,faq-s,faqs) etc, but cant quite figure it out where to put it...
Any help?
What have you done with the code lol, you've butchered it.
Go back to the last time you asked this, and take a look at my last post. In regex, where you put something means a lot, even 1 character different changes things.
Fex you've left out the x modifier in that second regex, so that those spaces around %a have become real spaces instead of being ignored. Instead you've put the x in the regex that doesn't need it.
And those $+() make no sense, they perform no function in your code.
I also believe the last thing I gave you were $regsubs, and not $regexes.
Anyway, use $replace(%a,faq-s,faqs) it's not the "most" fullproof method, but it'll work fine for you.
You put it in that /write line, instead of the %a.
rofl, yeah i did butch it:/ :P
However, it actually worked a lot greater when i modifed it a little bit..:P
(Alltho, i removed it from my post so ppl wont see how much i mess up..hehh).
But ty, ur method worked for my purpose.
Yeah removing the code does keep us from seeing it, however, it also prevents us from making other, and sometimes, better suggestions.
It was butchered regex code, nothing you would be able to assist with unless you have a decent knowledge of the regex syntax.
While I'm only just starting to learn about regex code, even seeing other people's mistakes and then the corrections made is helpful.
I've learned more from my failures than my successes