Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 27/09/2021 10:46:18
Showing 1 changed files
... ...
@@ -41,6 +41,7 @@ Daniel-Constantin Mierla
41 41
               4.9. pos_findi_str(idx, val)
42 42
               4.10. pos_rfind_str(idx, val)
43 43
               4.11. pos_rfindi_str(idx, val)
44
+              4.12. pos_search(idx, re)
44 45
 
45 46
    List of Examples
46 47
 
... ...
@@ -56,6 +57,7 @@ Daniel-Constantin Mierla
56 57
    1.10. pos_findi_str() usage
57 58
    1.11. pos_find_str() usage
58 59
    1.12. pos_rfindi_str() usage
60
+   1.13. pos_search() usage
59 61
 
60 62
 Chapter 1. Admin Guide
61 63
 
... ...
@@ -84,6 +86,7 @@ Chapter 1. Admin Guide
84 86
         4.9. pos_findi_str(idx, val)
85 87
         4.10. pos_rfind_str(idx, val)
86 88
         4.11. pos_rfindi_str(idx, val)
89
+        4.12. pos_search(idx, re)
87 90
 
88 91
 1. Overview
89 92
 
... ...
@@ -140,6 +143,7 @@ modparam("posops", "idx0", -200)
140 143
    4.9. pos_findi_str(idx, val)
141 144
    4.10. pos_rfind_str(idx, val)
142 145
    4.11. pos_rfindi_str(idx, val)
146
+   4.12. pos_search(idx, re)
143 147
 
144 148
 4.1.  pos_append(idx, val)
145 149
 
... ...
@@ -316,3 +320,23 @@ $var(idx) = pos_rfind_str("100", "kamailio");
316 320
 ...
317 321
 $var(idx) = pos_rfindi_str("100", "kamailio");
318 322
 ...
323
+
324
+4.12.  pos_search(idx, re)
325
+
326
+   Return the position that starts matching the regular expression re in
327
+   message buffer starting at idx. In case of not finding it or error, the
328
+   return code is negative. If val is at index 0, it returns the value
329
+   specified by modparam idx0.
330
+
331
+   The idx can be an integer value or a variable holding an integer. If
332
+   the value is negative, the position is counted from the end of the
333
+   buffer.
334
+
335
+   The re can be a static regular expression string.
336
+
337
+   This function can be used from ANY_ROUTE.
338
+
339
+   Example 1.13. pos_search() usage
340
+...
341
+$var(idx) = pos_search("100", "[0-9]+");
342
+...