Search notes:

R function: gregexpr

str <- c(
  'Foo Bar Baz',
  'one two three four five'
)

# Positions of o:
gregexpr("o", str)
# [[1]]
# [1] 2 3
# attr(,"match.length")
# [1] 1 1
# attr(,"useBytes")
# [1] TRUE
# 
# [[2]]
# [1]  1  7 16
# attr(,"match.length")
# [1] 1 1 1
# attr(,"useBytes")
# [1] TRUE
Github repository about-r, path: /functions/gregexpr.R

See also

Index to (some) R functions
String related R functions, R regular expression functions.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1745903757, '18.223.109.25', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/gregexpr(60): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78