Click here to Skip to main content
14,774,743 members
Home » Discussions » Regular Expressions
   

Regular Expressions

 
AnswerRe: Regex code to check textfield is working until a 'enter' is given Pin
Member 1255403315-Mar-18 7:53
MemberMember 1255403315-Mar-18 7:53 
GeneralRe: Regex code to check textfield is working until a 'enter' is given Pin
Super Superman16-Mar-18 4:07
MemberSuper Superman16-Mar-18 4:07 
GeneralRe: Regex code to check textfield is working until a 'enter' is given Pin
Member 1255403316-Mar-18 5:51
MemberMember 1255403316-Mar-18 5:51 
Questionregular expression to find tax file numbers Pin
Copalol3-Dec-17 20:08
MemberCopalol3-Dec-17 20:08 
AnswerRe: regular expression to find tax file numbers Pin
Peter_in_27803-Dec-17 20:48
professionalPeter_in_27803-Dec-17 20:48 
GeneralRe: regular expression to find tax file numbers Pin
jschell5-Dec-17 13:06
Memberjschell5-Dec-17 13:06 
AnswerRe: regular expression to find tax file numbers Pin
George Jonsson5-Dec-17 0:25
professionalGeorge Jonsson5-Dec-17 0:25 
GeneralRe: regular expression to find tax file numbers Pin
Copalol5-Dec-17 14:05
MemberCopalol5-Dec-17 14:05 
Thanks everyone, really appreciate the responses.

Unfortunately I think the only way I can do it is via a regular expression as I am applying it to pre-defined field within a cloud based email security gateway.
Sorry I should have been more detailed in my post.

In answer to one of your questions, the email gateway supports two types of regex syntax Java and Perl.

In the regex I don't need to include looking for the words "TFN" or "Tax File Number" as I can do this via the word / phrase match list on the email gateway.
https://community.mimecast.com/docs/DOC-1613#jive_content_id_Regular_Expressions_Text_Matches

In summary, it will match the regex string defined and match the words TFN or Tax file number and then flag it for the user to review.

I assigned a value for the trigger otherwise known as an activation score which is currently configured as "2" the regex is worth 1 activation point and the words “TFN” and/or “Tax File Number” are both worth another activation point thus triggering the rule if the regex string is matched + either of the words.

From the email gateway.
# search for TFNs
1 regex (\d{8,9})|(\d\d\d[ ]\d\d\d[ ]\d\d\d)|(\d\d\d[-]\d\d\d[-]\d\d\d)
# search for words "TFN" and/or "Tax File Number"
1 "Tax File Number"
1 "TFN"

The three formats I’ve configured to look for the tfns are
123 456 782
123456782
123-456-782
GeneralRe: regular expression to find tax file numbers Pin
jschell8-Dec-17 7:51
Memberjschell8-Dec-17 7:51 
AnswerRe: regular expression to find tax file numbers Pin
jschell5-Dec-17 13:22
Memberjschell5-Dec-17 13:22 
GeneralRe: regular expression to find tax file numbers Pin
Copalol5-Dec-17 14:32
MemberCopalol5-Dec-17 14:32 
QuestionCorrect Expression For 'Any Character Including Whitespace' Pin
Sonhospa7-May-17 10:23
MemberSonhospa7-May-17 10:23 
SuggestionRe: Correct Expression For 'Any Character Including Whitespace' Pin
Richard MacCutchan7-May-17 22:22
mveRichard MacCutchan7-May-17 22:22 
GeneralRe: Correct Expression For 'Any Character Including Whitespace' Pin
Sonhospa8-May-17 0:12
MemberSonhospa8-May-17 0:12 
GeneralRe: Correct Expression For 'Any Character Including Whitespace' Pin
Richard MacCutchan8-May-17 0:30
mveRichard MacCutchan8-May-17 0:30 
AnswerRe: Correct Expression For 'Any Character Including Whitespace' Pin
Bernhard Hiller8-May-17 0:13
MemberBernhard Hiller8-May-17 0:13 
AnswerRe: Correct Expression For 'Any Character Including Whitespace' Pin
Sonhospa8-May-17 1:24
MemberSonhospa8-May-17 1:24 
GeneralRe: Correct Expression For 'Any Character Including Whitespace' Pin
Richard MacCutchan8-May-17 3:25
mveRichard MacCutchan8-May-17 3:25 
QuestionHow to retain characters preceding a match? Pin
Member 1297660431-Jan-17 16:44
MemberMember 1297660431-Jan-17 16:44 
AnswerRe: How to retain characters preceding a match? Pin
Peter_in_278031-Jan-17 20:27
professionalPeter_in_278031-Jan-17 20:27 
GeneralRe: How to retain characters preceding a match? Pin
Member 1297660431-Jan-17 21:50
MemberMember 1297660431-Jan-17 21:50 
QuestionUsing back references to find data type naming standards violations Pin
Member 124482999-Apr-16 8:06
MemberMember 124482999-Apr-16 8:06 
AnswerRe: Using back references to find data type naming standards violations Pin
George Jonsson16-Apr-16 19:36
professionalGeorge Jonsson16-Apr-16 19:36 
GeneralRe: Using back references to find data type naming standards violations Pin
Member 1244829917-Apr-16 18:20
MemberMember 1244829917-Apr-16 18:20 
AnswerRe: Using back references to find data type naming standards violations Pin
George Jonsson17-Apr-16 20:13
professionalGeorge Jonsson17-Apr-16 20:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.