Cannonfodder Posted May 17, 2004 Report Share Posted May 17, 2004 I've been reading how-tos on regular expressions but haven't figured this out... hasn't clicked. I want to build a regular expression that does the following.. 1. case-insensitive 2. Finds the following pattern para*() where * is anything, characters or spaces, tabs whatever.. Any propeller heads out there? Additionally, an extra would be to take the same but the match would have to be any match parameters() parameter() paramete() paramet() parame() param() para() I'm using a company search engine so it has to be a regex, so it can't be linux specific.. Help? Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted May 18, 2004 Author Report Share Posted May 18, 2004 ooooh, and I thought you were a bunch of gee whiz hackers! Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted May 18, 2004 Report Share Posted May 18, 2004 just wait for the resident bash nut to appear and you will get your fill of a thousand ways to do your search. :D kidding aside, wont "para.*()" do? i dont know about the sensitivity issue though. i havent gone that deep yet. ciao! Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted May 18, 2004 Report Share Posted May 18, 2004 You may have to do para.*\(\) I dunno about case-insensitivity, though...maybe /para.*\(\)/i ? Quote Link to comment Share on other sites More sharing options...
Cannonfodder Posted May 18, 2004 Author Report Share Posted May 18, 2004 Your first example worked, however, it brought up various lines such as a = "parameter: " + somefunction() Maybe regular expressions can't do it? Wish I had more time to figure this but if anyone has any more input please add here. Most coders I know are familiar with regex but don't really know it in/out.. Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted May 19, 2004 Report Share Posted May 19, 2004 (edited) You may have to do para.*\(\) I dunno about case-insensitivity, though...maybe /para.*\(\)/i ? doesnt \(\) have a special meaning in regular expressions? aru taught me that those symbols keeps the matched characters inside. its so useful that i have created a wiki for it. B) ciao! Edited May 19, 2004 by ramfree17 Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.