hmm... where did you get this from?
\w should match a "word" character, and "\W" a "non-word" character.
So using both in a character class should be equivalent to matching any character.
(exclude newlines though, I'm not too sure about them)
So the pattern could be simplified to:
/../i
Now is the 0 or more quantifier, meaning that the preceding character is matched [0, infinity} number of times.
The ending i is to make the pattern case insensitive, but is sort of redundant here since we're matching anything.
Effectively, it looks like the pattern could be further simplified to:
/.+/
as + is the 1 or more quantifier.
This would then match a string that contains at least 1 character.
Using regular expressions for this is probably superfluous, since [man]strlen/man would do just as well.
Or even testing for !empty($str{0}), where $str is the string in question.
Disclaimer: I'm not an expert on regex....
EDIT:
oh yes, there's also a subpattern to it, but the subpattern is the whole pattern anyway.
So instead of having to use a back-reference, you can simply use the original string, excluding the regex delimiters (i.e. the starting and ending '/')