Skip to content

Commit 72be1ca

Browse files
authored
Update README.md
1 parent f540cf7 commit 72be1ca

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ $searcher
6262
->searchCode('<?php $oneA = "1a";');
6363
```
6464

65+
When searching using any of the available methods, regular expressions can be used by surrounding the name with slashes `/`, i.e. `/test\d+/`.
66+
6567
### Variable names
6668

67-
To search for variables by name, use the `variables` method. To use regular expressions, surround the values with `/`.
69+
To search for variables by name, use the `variables` method.
6870

6971
```php
7072
$results = $searcher
@@ -83,7 +85,7 @@ foreach($results->results as $result) {
8385

8486
### Functions
8587

86-
To search for function calls or definitions, use the `functions` method. Regular expressions can be used by surrounding the name with slashes `/`, i.e. `/test\d+/`.
88+
To search for function calls or definitions, use the `functions` method.
8789

8890
```php
8991
// search for references AND definitions for 'strtolower' and/or 'myfunc'
@@ -94,7 +96,7 @@ $searcher
9496

9597
### Method calls
9698

97-
To search for a method call by name, use the `methods` method before calling `search`. Surround the search terms with slashes to use regular expressions.
99+
To search for a method call by name, use the `methods` method.
98100

99101
Method call nodes have an `args` property that can be looped through to retrieve the arguments for the method call.
100102

@@ -118,7 +120,7 @@ foreach($results->results as $result) {
118120

119121
### Static calls
120122

121-
To search for static method or property calls, use the `static` method before calling `search`.
123+
To search for static method or property calls, use the `static` method.
122124

123125
Valid search terms are either a class name like `Cache`, or a class name and a method name like `Cache::remember`.
124126

@@ -130,7 +132,7 @@ $searcher
130132

131133
### Classes
132134

133-
To search for either a class definition or a class created by the `new` keyword, use the `classes`. Regular expression patterns are supported by surrounding a value with slashes `/`.
135+
To search for either a class definition or a class created by the `new` keyword, use the `classes` method.
134136

135137
```php
136138
$searcher
@@ -140,7 +142,7 @@ $searcher
140142

141143
### Variable assignments
142144

143-
To search for a variable assignment by variable name, use the `assignments` method before calling `search`. _Note: The `$` should be omitted._
145+
To search for a variable assignment by variable name, use the `assignments` method. _Note: The `$` should be omitted._
144146

145147
```php
146148
$searcher

0 commit comments

Comments
 (0)