![]() |
|
|||||||
| View Poll Results: Do regex's suck? | |||
| Yes! |
|
1 | 33.33% |
| No! |
|
2 | 66.67% |
| Sometimes... |
|
0 | 0% |
| Voters: 3. You may not vote on this poll | |||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
||||
|
||||
I hate Regex...If anyone here is any good with regular expressions I could use some help...I am writing a piece of software that needs to keep track of users in the database by their ID number so I have a DB fieled that contains all of the ID numbers of the members for each group something like 1, 2, 5, 99, 1000, etc...what I need to be able to do is whenever someone tries to "post" to a certain group it should check this table and make sure they are member first...I also need to be able to add new people to the end of the list automatically...ack...I hate MySQL...I am decent enough with it most of the time but it can be a real pain in my patooty! Thanks Guys!
Elmseeker |
||||
|
#2
|
||||
|
||||
|
I don't see how you need a regular expression for this... Why wouldn't array_filter() / in_array() work? Of course, you would need to get these values into an array first.
Perhaps I am missing something... would help if you describe the problem with a little more details. I voted NO by the way, working with regexs is like riding a bike - lots and I mean LOTS... of scratches and bruises in the beginning and then one day, you just don't think about it anymore! ... I wish! ![]() __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
||||
|
||||
|
Well, the main problem is that I need to seperate all of the different numbers from each other...they are comma seperated so i need to strip out the commas and then...yes putting the numbers into an array from there would be the way to go...
|
|
#4
|
||||
|
||||
|
simple....
PHP Code:
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does Google hate itself? | jrobbio | Open Discussion Forum | 0 | 01-Jul-2003 05:00 |
| A 'not' regex | Allowee | MySQL / PHP Forum | 1 | 07-Jun-2003 21:20 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The