verbose_regexp 1.0.0

  • Installing
  • Versions
  • 49

RegExp verbose mode in Dart


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.


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);



  • 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.


  • Initial version.

1. Depend on it

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

  verbose_regexp: "^1.0.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or packages 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';
Version Uploaded Documentation Archive
1.0.0 Dec 7, 2017 Go to the documentation of verbose_regexp 1.0.0 Download verbose_regexp 1.0.0 archive
0.1.0 Jan 3, 2016 Go to the documentation of verbose_regexp 0.1.0 Download verbose_regexp 0.1.0 archive


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
96 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:verbose_regexp/verbose_regexp.dart.


  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use verbose_regexp.dart.


Package Constraint Resolved Available
Dev dependencies
test ^0.12.0