REGEXEXTRACT to extract a subsection of text
Posted on 2014-10-04
Hiya, I recently came across the REGEXEXTRACT function in google docs but there is no documentation. I think it will do what i want though, that is to split a windows file path into parts based on searches eg:
C:\user\Dropbox\property\maintenance & repairs\open\oddj smp1 slight leak through new window (normal).jpg
extract "open" with the rule: the text between the last two backslashes
extract "oddj" with the rule: from the last backslash to the next space
extract "smp1" with the rule: from "oddj" until the second space
extract "slight leak through new window" with the rule from "smp1" until the full stop (or space before if there is one)
extract "normal" with the rule text between the last set of brackets
Can anyone help with some or all of these? The rules can be bent as long as they give the correct answer in any similar example.
Thanks a million!