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,9 @@ +// @flow + +import { oldValidUsernameRegexString } from 'lib/shared/account-utils'; + +const nativeTypeaheadRegex: RegExp = new RegExp( + `((^(.|\n)*\\s+)|^)@(${oldValidUsernameRegexString})?$`, +); + +export { nativeTypeaheadRegex };