[sr-dev] git:master:2fdf550a: modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev kamailio.dev at kamailio.org
Mon Sep 27 12:46:23 CEST 2021


Module: kamailio
Branch: master
Commit: 2fdf550ac0a865ba2336e80ce2d450f3c378ad50
URL: https://github.com/kamailio/kamailio/commit/2fdf550ac0a865ba2336e80ce2d450f3c378ad50

Author: Kamailio Dev <kamailio.dev at kamailio.org>
Committer: Kamailio Dev <kamailio.dev at kamailio.org>
Date: 2021-09-27T12:46:18+02:00

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

---

Modified: src/modules/posops/README

---

Diff:  https://github.com/kamailio/kamailio/commit/2fdf550ac0a865ba2336e80ce2d450f3c378ad50.diff
Patch: https://github.com/kamailio/kamailio/commit/2fdf550ac0a865ba2336e80ce2d450f3c378ad50.patch

---

diff --git a/src/modules/posops/README b/src/modules/posops/README
index d5f49f0cbb..6e126f645f 100644
--- a/src/modules/posops/README
+++ b/src/modules/posops/README
@@ -41,6 +41,7 @@ Daniel-Constantin Mierla
               4.9. pos_findi_str(idx, val)
               4.10. pos_rfind_str(idx, val)
               4.11. pos_rfindi_str(idx, val)
+              4.12. pos_search(idx, re)
 
    List of Examples
 
@@ -56,6 +57,7 @@ Daniel-Constantin Mierla
    1.10. pos_findi_str() usage
    1.11. pos_find_str() usage
    1.12. pos_rfindi_str() usage
+   1.13. pos_search() usage
 
 Chapter 1. Admin Guide
 
@@ -84,6 +86,7 @@ Chapter 1. Admin Guide
         4.9. pos_findi_str(idx, val)
         4.10. pos_rfind_str(idx, val)
         4.11. pos_rfindi_str(idx, val)
+        4.12. pos_search(idx, re)
 
 1. Overview
 
@@ -140,6 +143,7 @@ modparam("posops", "idx0", -200)
    4.9. pos_findi_str(idx, val)
    4.10. pos_rfind_str(idx, val)
    4.11. pos_rfindi_str(idx, val)
+   4.12. pos_search(idx, re)
 
 4.1.  pos_append(idx, val)
 
@@ -316,3 +320,23 @@ $var(idx) = pos_rfind_str("100", "kamailio");
 ...
 $var(idx) = pos_rfindi_str("100", "kamailio");
 ...
+
+4.12.  pos_search(idx, re)
+
+   Return the position that starts matching the regular expression re in
+   message buffer starting at idx. In case of not finding it or error, the
+   return code is negative. If val is at index 0, it returns the value
+   specified by modparam idx0.
+
+   The idx can be an integer value or a variable holding an integer. If
+   the value is negative, the position is counted from the end of the
+   buffer.
+
+   The re can be a static regular expression string.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.13. pos_search() usage
+...
+$var(idx) = pos_search("100", "[0-9]+");
+...




More information about the sr-dev mailing list