We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b4a419 commit f47ea54Copy full SHA for f47ea54
Specialized Areas/Regular Expressions/Hastag Extraction/script.js
@@ -0,0 +1,15 @@
1
+(function() {
2
+
3
+ var demoData = "Quick test for hashtag and mention extraction in ServiceNow. " +
4
+ "Let's make sure it catches #Hack4Good #ServiceNow #regex and mentions like @ivan and @servicenow.";
5
6
+ var tagRegex = /[#@][A-Za-z0-9_]+/g;
7
+ var matches = demoData.match(tagRegex);
8
9
+ if (matches && matches.length > 0) {
10
+ gs.info('Found ' + matches.length + ' tags: ' + matches.join(', '));
11
+ } else {
12
+ gs.info('No hashtags or mentions found.');
13
+ }
14
15
+})();
0 commit comments