How to account for accent characters for regex in Python?
Try the following: hashtags = re.findall(r’#(\w+)’, str1, re.UNICODE) Regex101 Demo EDIT Check the useful comment below from Martijn Pieters.
Try the following: hashtags = re.findall(r’#(\w+)’, str1, re.UNICODE) Regex101 Demo EDIT Check the useful comment below from Martijn Pieters.
It looks like this is the basic setup: https://twitter.com/intent/tweet? url=<url to tweet> text=<text to tweet> hashtags=<comma separated list of hashtags, with no # on them> This would pre-built a tweet of: <text> <url> <hashtags> The above example would be: https://twitter.com/intent/tweet?url=http://www.example.com&text=I+am+eating+branston+pickel+right+now&hashtags=bransonpickel,pickles There used to be a bug with the hashtags parameter… it only showed the first … Read more
I would advise going with a typical many-to-many-relationship between messages and tags. That would mean you need 3 tables. Messages (columns Id, UserId and Content) Tags (columns Id and TagName) TagMessageRelations (columns: MessageId and TagId – to make the connections between messages and tags – via foreign keys pointing to Messages.Id / Tags.Id) That way … Read more
There is currently no API for the hashtags feature on Facebook edit: there was however a public posts search function which will return some public posts with a certain hashtag if you use that hashtag as the search string in API version 1.0 – there is no equivalent in version 2.0 onwards It ignores the … Read more
<a href=”#!” class=”service”>Open</a>
Update This is now supported <a [routerLink]=”[‘somepath’]” fragment=”Test”>Jump to ‘Test’ anchor </a> this._router.navigate( [‘/somepath’, id ], {fragment: ‘test’}); Add Below code to your component to scroll import {ActivatedRoute} from ‘@angular/router’; // <– do not forget to import private fragment: string; constructor(private route: ActivatedRoute) { } ngOnInit() { this.route.fragment.subscribe(fragment => { this.fragment = fragment; }); } … Read more
You’re looking for $anchorScroll(). Here’s the (crappy) documentation. And here’s the source. Basically you just inject it and call it in your controller, and it will scroll you to any element with the id found in $location.hash() app.controller(‘TestCtrl’, function($scope, $location, $anchorScroll) { $scope.scrollTo = function(id) { $location.hash(id); $anchorScroll(); } }); <a ng-click=”scrollTo(‘foo’)”>Foo</a> <div id=”foo”>Here you … Read more