How To Get All Characters From The Right Up To The Particular Character In Dart
I am trying to get all characters from the right up to the '*' from below string.
String phoneNumber = '07*** ***253'
Here I want the substring as '253'
ex: '07*** ***4253' result: 4253
You can split the string with split()
var _phone = "07*** ***253"; String _last = _phone.split('*').last;
Or same with regexp
RegExp reg = RegExp(r'[^*]*$'); var _matched = reg.allMatches(_phone); _matches.last.group(0);
- → I can't convert Json to string [OctoberCms]
- → Passing a JS var from AJAX response to Twig
- → how to convert stdclass into string
- → Dynamic url segment name in laravel 5.1
- → Knockout JS - How to return empty strings for observable fields
- → How to replace *( in a string
- → Is this considered to be a custom facade approach in Laravel?
- → Regex extract string after the second "." dot character at the end of a string
- → Htaccess negation
- → Convert generic text string in json object into valid url using Angular