Skip to content

Instantly share code, notes, and snippets.

@manofi21
Created February 9, 2023 10:11
Show Gist options
  • Select an option

  • Save manofi21/1e004ac37930b39e33f5cf6e11f0d2f9 to your computer and use it in GitHub Desktop.

Select an option

Save manofi21/1e004ac37930b39e33f5cf6e11f0d2f9 to your computer and use it in GitHub Desktop.
Regex for check first chracter is gs:// or https

Regex for check first chracter is gs:// or https

Created with <3 with dartpad.dev.

void main() {
final autodata = "gs://aksdjasdsad";
final autoCheckRx = RegExp('(?:(?: G|^gs://)|(?: G|^https:))');
print(autoCheckRx.hasMatch(autodata));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment