WHM: How to search for accounts
If you watched the previous tutorial, you should have seen the advanced account search tool in WHM. This tool is accessible on the List Accounts page as well as on its own page.
This search form is exactly the same as the one on the List Accounts page. In fact, any results from searches made here will be displayed using that system.
This search tool operates using regular expressions, if you’re at all familiar with those. Regular expressions are far too complex to describe here in detail, but we will give you a few helpful hints.
The backslash preceeding the period in .net needs to be there because a period in regular expressions is a wildcard — it can represent any character, not just a period. Placing a backslash in front of a special character such as the period will disable its special functionality.
A dollar sign $ in regular expressions signifies the end of a string of text. Since a top-level domain such as .net always comes at the end of the domain name, that’s why a dollar sign is used here.
Similarly, a caret ^ can be used to signify the start of a string. So, we could search for all accounts with an IP address beginning with 12.202 using the following regular expression:^12.202
This may seem overly complicated, but regular expressions can be a very powerful tool, and would be especially useful if ever you have hundreds of accounts on this server.
You can always just treat this form as the search forms you’re used to. A standard search query is a valid regular expression, after all.
Now… let’s perform a search.
5) Change the number of accounts per page, if you want.
7) Click the Forget Search link to revert to the standard account list.
This completes the tutorial. You now know how to search for accounts on your WHM server, and you may have learned a little bit about regular expressions in the process.