0

I need to delimit the string and this time the delimiter is $($, but I need to note that the next character is number ( because I am specifically trying to separate the title from the year from one column. ) Even better would be that I could indicate, that after $($ there are 4 digits. But in general my question is where can I find all the symbols that denote different form of characters or group of character in order to make it easier to separate text into two columns. Thanks in advance.

use1883
  • 59
  • 7
  • 2
    Please include an example of what you have tried including the code you used. It would really be useful if you show what you want to achieve. This link may be helpful [mre]. Also this link for [regex cheatsheet] (https://rstudio.com/wp-content/uploads/2016/09/RegExCheatsheet.pdf). Have you looked at `dplyr::separate` function for splitting strings in a column? – Peter Apr 19 '20 at 13:45
  • @Peter Yes, I did look and I don't mind if I don't get an answer to my specific question. I simply wanted to know, if there is some online resource where I could look up all the character denotations like "+", ".", "^", "$" and so on. I simply can't find it anywhere. – use1883 Apr 19 '20 at 13:48
  • 1
    For help on regex's try, well, `help('regex')`. – Rui Barradas Apr 19 '20 at 13:49
  • @RuiBarradas Thank you very much. Is it possible to somehow indicate delimiter as '\\(' and also note that the next character should be a digit, but so that it doesn't use the digit as separator? – use1883 Apr 19 '20 at 13:56
  • 1
    you might be looking for "lookahead"? – Ben Bolker Apr 19 '20 at 14:15
  • Does this answer your question? [what is the difference between ?:, ?! and ?= in regex?](https://stackoverflow.com/questions/10804732/what-is-the-difference-between-and-in-regex) – NelsonGon Apr 19 '20 at 14:19

0 Answers0