[Request] A simple regular expression function - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [Request] A simple regular expression function (/showthread.php?tid=83432) [Request] A simple regular expression function by Skarbo on 04-28-2008 at 09:33 AM
Im not any good at building regular expression so i need a litle help with this simple function. RE: [Request] A simple regular expression function by markee on 04-28-2008 at 11:14 AM
If they are all grouped together: code: I personally can't think of a way to get all of them on the end however... This code might work but t is untested... code: RE: [Request] A simple regular expression function by John Anderton on 04-28-2008 at 05:40 PM
Try this. Non regexp method though. RE: [Request] A simple regular expression function by markee on 04-28-2008 at 08:48 PM
quote:That would require a for loop that has more (or at least equal - only when there are no instances of double leters) itterations than my while though.... and would probably be a while satement unles you checked each letter individually. However your method is better for someone to learn how to do it themselves I guess..... RE: [Request] A simple regular expression function by Matti on 04-29-2008 at 04:43 PM
Looks like some very untested code, yes. I can't seem to get it working whatsoever, it's crashing my Messenger every time I try to run this (infinite loop?): code:Could you try to find some time to get it working in some way? RE: [Request] A simple regular expression function by Skarbo on 04-29-2008 at 04:52 PM
I made a simple function for now (before your post John Anderton ) code: RE: [Request] A simple regular expression function by markee on 04-30-2008 at 09:39 AM
quote:Got it working now code:This has FAR less itterations and should respond quicker. Realy I should do error checking to make sure sub is only a single character, but if you are carful then there shouln't be any problem and will work faster. I hope this helps |