verbose_regexp 1.0.0+1

  • Readme
  • Changelog
  • Installing
  • 44

RegExp verbose mode in Dart #

Build Status

Overview #

This package contains a single function verbose(String) → String that can be used to simulate the verbose mode known from other RegEx implementations like python. This function will simply remove all unescaped whitespace and line comments and return a purged Dart regular expression that you can pass to the RegExp constructor.

Usage #

import 'package:verbose_regexp/verbose_regexp.dart';

var a = new RegExp(verbose(r'''
  \d +  # the integral part
  \.    # the decimal point
  \d *  # some fractional digits'''));

var b = new RegExp(r'\d+\.\d*');

void main() {
  assert(a == b);

Changelog #

1.0.0+1 #

  • Add SDK constraint so the package can be used in Dart 2.0.0.
  • Run dartfmt --fix.

1.0.0 #

  • Bump version to 1.0.0. Nothing changed really, but since I don't expect any design/API changes, I should have used this version number a year ago.
  • Cosmetic changes to appease pana: Add analysis_options.yaml and
  • Fix strong_mode and linter warnings.
  • Update repository name in pubspec.yaml.

0.1.0 #

  • Initial version.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  verbose_regexp: ^1.0.0+1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:verbose_regexp/verbose_regexp.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 17, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.2

Maintenance suggestions

Package is getting outdated. (-18.63 points)

The package was last published 61 weeks ago.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and verbose_regexp.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.0.0