Tags » Regex

regex dash - inside bracket []

We have a requirement to remove some illegal character in file name like slash etc… So I put on a regex in our code:

[^a-zA-Z0-9.-_] 98 more words
Java

Amazing Regex Code Snippets for Web Developers

If you consider yourself a programmer and you have not learned regular expressions yet now is the time! At some point in your development you will need to manipulate strings in more complicated ways that simple string functions can’t provide. 433 more words

Web Development

SharePoint RegEx - C#

We integrated CRM with SharePoint and decided to create a document set for every entity in CRM. I wrote an application to automate the process using C# and ran into an issue where entity names ended with periods (e.g. 50 more words

SharePoint 2013

Looking for email address | Python

#This program filter email accounts
import re, pyperclip

emailRegex = re.compile(r'''(
+                        # username
@ # symbol
+                          # domain name
\.{2,4}                         # dot something
)''', re.VERBOSE)

text = str(pyperclip.paste())
addMails = ''

for mails in emailRegex.findall(text):
    addMails += mails + '\n'

try:
    emailDoc = open('C:\\Users\\All users\\Desktop\\List_Of_Mails.txt', 'w')
    emailDoc.write('%s' % (addMails))
    emailDoc.close()
except Exception:
    emailDoc = open('List_Of_Mails.txt', 'w')
    emailDoc.write('%s' % (addMails))
    emailDoc.close() 7 more words
Python

Week 8: Wrap-up (Final Week of Ignition)

GIT & Unit Testing

Holy toledo! I just assumed that week 8 would be a nice transition week, not necessarily a breeze but certainly not what it was – … 1,801 more words

Launch