REGEX Support would be great
KingMoore - September 12, 2008 - 01:22
| Project: | Search and Replace |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
Good start on this module. I am looking for this sort of functionality, but in order to really be useful to me I would need REGEX support for searching/replacing.
Ability to search CCK fields is also pretty crucial, but I see you have already noted you would like to do that.
Thanks for your work.

#1
What's REGEX support? Give me an example and I'll gladly include it in a newer version when I get to creating one.
#2
Searching based on regular expressions. It's a very powerful way to search for patterns in text. Learn more here:
http://au2.php.net/manual/en/book.regex.php
#3
regular expressions is built into php so you just use their functions
http://www.webcheatsheet.com/php/regular_expressions.php
#4
Yikes...yeah I'd have to look into that a lot deeper. That screams potential security issues so if I would add something like that. I think it would have to be something that is heavily permissions based to lock it down, or that could only be performed by the uid=1 user.
I'd welcome thoughts or a patch for this type of functionality. It's not difficult to add, I just think it's something that could possibly be done better with wildcards or done in a mapping language that makes it easier for our end users to use. I wrote this for non-technical people to be able to search and replace quickly. This could add power but could also up the cost of entry into understanding how to tap into the full potential of this type of functionality.
#5
this can only be used by admins to filter swear words etc
#6
did u go regex for drupal 6?? :D
#7
I'll accept patches for it, got a lot on the plate and I was only able to get it out the door. Only feature difference is that it's permission based now so you can give roles access to it now. It's still beta though so I'm willing to add to it if someone would help me understand how to correctly implement it.