How to return letters between points using a regular expression?

1

I'm using Google Drive and would like to use a regular expression to separate the characters between points, as below:

  

a · bai · xa · men · to
  a · bai · xo

I need to put in each column the content between the points (in the first and last case just before and after the point).

  

a · bai · xa · men · to = > a bai xa men to

     

a · bai · xo = > a bai xo

I would need a code for each column of the "answer" For example a · bai · xa · men · to (a) first letter before the point (b) letter between the first 2 points (c) letter between the second and the third point, etc.

    
asked by anonymous 06.04.2016 / 12:46

2 answers

0

I'm not an expert with regular expressions, but I think the expression would look like this:

[a-z]
    
06.04.2016 / 15:14
0

Simply use [^\.]+

This regex will catch anything that is not a dot.

However what you suggest to enumerate each group of characters is not possible, since regex can not "count".

At most you can get the first group with ^[^\.]+ and last with [^\.]+$ .

I also suggest that you make a program that consumes the string at each point and counting, it's pretty easy.

    
08.02.2017 / 04:22