Tags » Regex

Scraping a Form for Input Fields Python 3.4

In this post  I will attempt to show you how to scrape a form using Regex and Xpath using the requests and lmxl packages for Python 3.4 + 1,454 more words

Python 3

Understanding Regular Expressions

Although I have studied regular expressions in my course work, I finally learnt their significance and implementation in the programming environment.

I happened to find this google tutorial on regular expressions and I remembered feeling uneasy while using them earlier, so I set out to understand the concepts once and for all. 490 more words

Regular expressions

Regular expressions are a method for describing patterns in text strings. They can be useful for searching and replacing text and provide efficient ways to fix up messy data. 935 more words

Hydrology

USING REGULAR EXPRESSION AND R TO CLEAN CUSTOMER LISTS FOR ANALYSIS: PART 2

april 16, 2015

In part 1, we looked at cleaning Names and Extracting any additional information, such as educational degree’s and suffix’s. (Part 1… 7,783 more words

ANALYTICS

Create Slug for a string

Regular expression function that replaces spaces & special characters between words with hyphens


function create_slug($string) {
	// removing special characters from the string
	$slug = preg_replace('/[^A-Za-z0-9-]+/', '-', $string);
	// removing multiple - generated in slug
	$slug = preg_replace("/[\s-]+/", '-', $slug);
	// lower case slug string
	$slug = strtolower($slug);
	// removing - from the first & last place if any
	$slug = trim($slug, "-");
	return $slug;
}

echo create_slug(" This ~` is ?><:{}|\][;/.,]+_)(*&^%$#@!) 'MY TITLE' for------this post. ");

PHP

Query Inside a Doc Set for Specific Documents to Convert to PDF

I came across an interesting (and unexpected) challenge today and thought I would share my solution in case there are others out there who may be facing a similar set of requirements. 464 more words

Nintex Workflow