Hi.
Background - I'm used to use Notepad2-mod or Notepad3 to work with regular expression in text files. Libre Office does use slightly different set of syntax. But this I don't get.
I have a spread sheet in Libre Office with this cell content:
headline A1:E1
Text_String; First word; Second word; date; clock
A2 "Varekjøp butikken på nesset Dato 05.08 kl. 14.27 "
B2 =REGEX(A2;"^(\S+) "; ;1)
B2 returns "Varekjøp" as expected
C2 =REGEX(A2;"^\S+ ([:alpha:]+) ";"$1")
C2 returns "butikkenpå nesset Dato 05.08 kl. 14.27 "
So far, extracting the first word seems to work just fine.
However, extracting second word doesn't work as expected.
I'd be very glad if somebody could point me in right direction. I hope that If I get to know what I'm doing wrong here, I should be able of also extracting date and time as well (no need to help on that in particular, because I need to learn this better).
Thanks in advance
Background - I'm used to use Notepad2-mod or Notepad3 to work with regular expression in text files. Libre Office does use slightly different set of syntax. But this I don't get.
I have a spread sheet in Libre Office with this cell content:
headline A1:E1
Text_String; First word; Second word; date; clock
A2 "Varekjøp butikken på nesset Dato 05.08 kl. 14.27 "
B2 =REGEX(A2;"^(\S+) "; ;1)
B2 returns "Varekjøp" as expected
C2 =REGEX(A2;"^\S+ ([:alpha:]+) ";"$1")
C2 returns "butikkenpå nesset Dato 05.08 kl. 14.27 "
So far, extracting the first word seems to work just fine.
However, extracting second word doesn't work as expected.
- It returns all contents of the remainder characters after second word.
- It also remove a space between second and third word.
I'd be very glad if somebody could point me in right direction. I hope that If I get to know what I'm doing wrong here, I should be able of also extracting date and time as well (no need to help on that in particular, because I need to learn this better).
Thanks in advance