Aligning strings with regex.

regex_valign(stringvec, regex_ai, sep_str = "")

## Arguments

stringvec A character vector with one element for each line. A regular expression matching the position for alignment. Optional character vector that will be inserted at the positions matched by the regular expression.

## Value

A character vector with one element for each line, with padding inserted at the matched postitions so that elements are vertically aligned across lines.

## Details

This function is based on textutils::valign(), and may be handy for reading fixed width files, text, or tables parsed from PDFs.

## Examples

guests <-
regex_valign(guests_lines, "\\b(?=[0-9]{2}[\\/]{1}[0-9]{2}[\\/]{1}[0-9]{4})")#> Error in regex_valign(guests_lines, "\\b(?=[0-9]{2}[\\/]{1}[0-9]{2}[\\/]{1}[0-9]{4})"): object 'guests_lines' not found