[PHP] strip slashes from beginning and end of string in one expression

2006-08-31 Thread Dave M G
PHP list. This is another regular expression type of question. The very handy PHP function trim() takes excess white space off the beginning and end of a string. I'd like to be able to do the same thing, except instead of white spaces, trim excess slashes: / So for example, all of these:

Re: [PHP] strip slashes from beginning and end of string in one expression

2006-08-31 Thread Stut
Dave M G wrote: This is another regular expression type of question. The very handy PHP function trim() takes excess white space off the beginning and end of a string. I'd like to be able to do the same thing, except instead of white spaces, trim excess slashes: / So for example, all of