bib.bibtexbase.standardize._base¶
Base utilities for BibTeX standardization.
This module provides fundamental utility functions used throughout the standardization process, particularly for text processing and pattern matching.
Functions:
| Name | Description |
|---|---|
split_data_list | Splits a list of strings according to a regex pattern, with options for handling the last element differently. |
Functions¶
split_data_list ¶
Split data list according to the split pattern.
The capturing parentheses must be used in the pattern, such as (\n).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
split_pattern | str | split pattern. | required |
data_list | list[str] | data list. | required |
last_next | str | "next" or "last". | 'next' |
Returns:
| Type | Description |
|---|---|
list[str] | list[str]: new data list. |
Examples:
split_pattern = r"(\n)", last_next = "next" or "last".