Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I would expect Repetition to act like Wildcards but ' + ' is not a wildcard.

The meaning of the term "wildcard" may be ambiguous. The plus sign, called a "repetition operator", is used to modify what precedes it, like this:

\w+ will match one or more word characters. Word characters are usually in the set A-Z, a-z, 0-9 and the underscore.

In much the same way, \w* will match zero or more word characters.

And \w? will match zero or one word characters.

If you want to use one of these repetition operators in your search, preceded it with a reverse slash:

"true\?" will match "true" followed by a question mark, while "true?" will match "tru" optionally followed by "e".



Thanks for your answer. I wrote it to show example of my confusion.

Anyhow. I read your words and will code it later tonight. Thanks man.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: