Skip to content

Commit

Permalink
fix - was not reading in and setting can be blank values. take <rest>…
Browse files Browse the repository at this point in the history
… off example regex and make sure they are good. more explanation of regex in read.me put sub-accounts into import-to-account list for user.
  • Loading branch information
stan committed Apr 17, 2018
1 parent 46b084f commit 800ed39
Show file tree
Hide file tree
Showing 4 changed files with 289 additions and 184 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,29 @@ It populates "Select Import File:" dropdown with my list of files that match my

** regex field parsing changed in v21 to hopefully give more flexibility. you need to use "named capture groups", as in:

"?(?<value>.*?)"?(?:[,]|\Z)(?<rest>.*)

```java
value = what string you want to pull out for the field value.
rest = is left over line to parse next.

```java
"?(?<value>.*?)"?(?:[,]|\Z)(?<rest>(.*|\Z)) will handle basic csv parsing

"(?<value>.*?)"(?:[,]|\Z)(?<rest>(.*|\Z)) I had to do this to get amount within "123,456.78"

"?(?<value>.*?)"?(?:[,]|\Z) final list for "ignore rest"

(?:CHECK[ ](?<value>\d*)|(.{0,0}))(?<rest>.*) This actually adds an extra column.

it will parse
04/10/2018,CHECK 0001234,,"($530.46)","$123"
04/04/2018,Insurance,PREM,"($467.30)","$5"

into
04/10/2018,1234, , ,"($530.46)","$123"
04/04/2018, ,Insurance,PREM,"($467.30)","$5"


How it parses a whole line:

if you have this line:
01/14/2018,check 3000,My Store,$123.40,whatever

Expand Down
Loading

0 comments on commit 800ed39

Please sign in to comment.