- Joined
- Sep 29, 2004
- Messages
- 1,417
- Reaction score
- 29
Hi,
I am having a basic problem with Regular Expressions and the Mod_Rewrite rule. I need to pattern match the space (" ") character ???
I am trying to rewrite a URL which contains a username variable:
RewriteRule ^([a-zA-Z0-9_.]*)/index.html /index.php?username=$1 [L,NC]
This works fine with usernames like "Dave_439" or "Emma.C", but unfortuantely the site I'm working on also alows users to have spaces in their username, so I also need to match "Dave 439" or "Emma C".
Does anyone know how to include spaces in my Regular Expression?
(Obviously I have tried [a-zA-Z0-9_. ]* which generates errors...)
I am having a basic problem with Regular Expressions and the Mod_Rewrite rule. I need to pattern match the space (" ") character ???
I am trying to rewrite a URL which contains a username variable:
RewriteRule ^([a-zA-Z0-9_.]*)/index.html /index.php?username=$1 [L,NC]
This works fine with usernames like "Dave_439" or "Emma.C", but unfortuantely the site I'm working on also alows users to have spaces in their username, so I also need to match "Dave 439" or "Emma C".
Does anyone know how to include spaces in my Regular Expression?
(Obviously I have tried [a-zA-Z0-9_. ]* which generates errors...)