Hi, many thanks for your reply.
The result remains the same, meaning they differ. When I run the chunk it's 1, when I knit it's 0. I strongly assume it has something to do with the Cyrillic letters. When I change the search pattern to a term written in the Latin alphabet it's fine.
I ran the code on my RStudio Cloud account and there the results are fine. It's the same R Version ("R version 4.0.3), the same knitr (1.37), stringr (1.4.0) and Rmarkdown (2.11) version.
Below the output. Any idea?
test
1/3/2022
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.0.5
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5 v purrr 0.3.4
## v tibble 3.1.6 v dplyr 1.0.7
## v tidyr 1.1.4 v stringr 1.4.0
## v readr 2.1.1 v forcats 0.5.1
## Warning: package 'ggplot2' was built under R version 4.0.5
## Warning: package 'tidyr' was built under R version 4.0.5
## Warning: package 'readr' was built under R version 4.0.5
## Warning: package 'dplyr' was built under R version 4.0.5
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
txt <- "30. In a decision of 18 April 2006 (реш. № 4 от 18 април 2006 г. по конституционно дело № 11 от 2005 г., обн., ДВ, бр. 36 от 2 май 2006 г.) the Constitutional Court declared unconstitutional section 132d(3) of the ESA, which had almost identical wording as the one of section 33(1)(c) but concerned accused detainees. Since the subject-matter of the case was limited to the former provision, section 33(1)(c) was not reviewed for constitutionality."
stringr::str_count(txt, regex("обн\\."))
## [1] 0