> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Use word boundaries in Regular Expressions
- URL: https://kudithipudi.org/how-to-use-word-boundaries-in-regular-expressions/
- Published: 2012-07-30T21:04:41.000Z
- Updated: 2012-07-30T21:04:41.000Z
- Description: If you are every looking to match strings as a whole word instead of literal strings using a regular express, Word Boundaries are your friend For...
- Author: admin
- Tags: HOWTO, Technology, Uncategorized, #wp, #wp-post, #Import 2026-08-23 02:32

If you are every looking to match strings as a whole word instead of literal strings using a regular express, Word Boundaries are your friend

For example if you are looking to match a string of 10 numbers in a log file, you can use

```
grep -i ‘\b[0-9]\{10,\}\b’ –color -H -n FILE_NAME_TO_SEARCH
```

The \\b is the option that tells grep to look for a word character.

More information about the option is available at [http://www.regular-expressions.info/wordboundaries.html](http://www.regular-expressions.info/wordboundaries.html?ref=kudithipudi.org)