Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33255195
D6298.1768580292.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
521 B
Referenced Files
None
Subscribers
None
D6298.1768580292.diff
View Options
diff --git a/native/utils/typeahead-utils.js b/native/utils/typeahead-utils.js
new file mode 100644
--- /dev/null
+++ b/native/utils/typeahead-utils.js
@@ -0,0 +1,11 @@
+// @flow
+
+import { oldValidUsernameRegexString } from 'lib/shared/account-utils';
+
+// Native regex is a little bit different than web one as
+// there are no named capturing groups yet on native.
+const nativeTypeaheadRegex: RegExp = new RegExp(
+ `((^(.|\n)*\\s+)|^)@(${oldValidUsernameRegexString})?$`,
+);
+
+export { nativeTypeaheadRegex };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 16, 4:18 PM (9 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5945241
Default Alt Text
D6298.1768580292.diff (521 B)
Attached To
Mode
D6298: [2/n] Native Typeahead - Adding utility file and native regex
Attached
Detach File
Event Timeline
Log In to Comment