Topic awaiting preservation: Regular Expressions/PHP |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: Berlin, Germany |
posted 06-14-2003 14:59
How can i test a string if it contians one of the characters: \/*? |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 06-14-2003 16:21
preg_match('/[\\\/*? |
Bipolar (III) Inmate From: Berlin, Germany |
posted 06-15-2003 02:54
Thanks. |
Maniac (V) Mad Scientist From: :morF |
posted 06-15-2003 07:05
Here's something I've always wondered...The search conditions in the preg_replace (like the above example of '/[\\\/*? |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 06-15-2003 12:22
Perl compatible reg exp syntax |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 06-15-2003 17:53
In this particular example the arrangement is not important. |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 06-18-2003 17:14
Okay, I did not test that statement to verify that it's exactly correct. The complication is that there are two layers of parsing going on. First PHP parses the string itself. Because I used single quotes, I need to escape the single quote within the string. Additionally, a double backslash will be parsed into one. So while we start with: |