54 posts tagged with regex.
Displaying 1 through 50 of 54. Subscribe:

Question about regular expressions for interpreting sentences

I am bad at regexes. Let's say I want to search a body of text for a pattern, "the sixth planet is {%planet}." (Just like that, without the planet filled in.) My regex finds the sentence "The sixth planet is Saturn." I want to capture not just the pattern, but the word "Saturn," so I can stick it in a variable. [more inside]
posted by johngoren on Feb 15, 2016 - 9 answers

Service to clean up Google Alert URLs using Regex

I want to clean up the URLS of a Google Alerts RSS Feed. I used to use a Yahoo Pipes REGEX to to do this, but that service is now dead. What are my (simple + free + preferably online) alternatives? [more inside]
posted by 0bvious on Feb 12, 2016 - 8 answers

Looking for good regex tutorial

I would like to learn regex and am looking for a good tutorial. Brief details inside. [more inside]
posted by marienbad on Feb 4, 2016 - 13 answers

Parsing movie/TV scripts

I have several scripts for movies and TV shows which appear to be in a standard tab-delimited format. I would like to get each character's lines alone into a new separate text document (likely via a computer script). [more inside]
posted by antonymous on Jan 5, 2015 - 6 answers

My order, fill it!

We have four departments and each has their own way of managing their student lists, I'd like to find one solution to rule them all. [more inside]
posted by monocultured on Aug 28, 2013 - 6 answers

Help me find permutations of abc with \. and _ characters

[Regex-and-stack-overflowfilter]: Can you help me identify abc a.b.c. a.b.c a_b_c ab_c a_b.c. and any permutation of those characters? More below the fold. [more inside]
posted by Nanukthedog on May 1, 2013 - 11 answers

What is this search string convention?

I tried to search a database at the place I volunteer with REGEX, but it didn't work. The database interface has some built-in options to search, so I have been messing with those trying to figure out what conventions it will allow. Can you tell me what this is? [more inside]
posted by Nattie on Apr 23, 2013 - 7 answers

Using grep to extract x characters of text after a predictable pattern

I'm trying to work out how to use something like grep or sed or awk (or maybe even some Perl) to extract a string of characters which appears in a predictable place in a series of text files. Help/advice/tutorials very welcome! [more inside]
posted by infinitejones on Mar 15, 2013 - 8 answers

Now you have n problems.

"Some people, when confronted with a problem, think 'I know, I'll use %s' Now they have %d problems." How many variations on this joke do you know?
posted by ecmendenhall on Feb 26, 2013 - 19 answers

Put me out of my regexing misery.

I need a regex that will recursively match anything after a forward slash to the end of a URL. [more inside]
posted by dozo on Jun 21, 2012 - 15 answers

Automatically adding Amazon affiliate codes

Is there a straightforward way to transform Amazon links to add an affiliate code? [more inside]
posted by fightorflight on Jan 11, 2012 - 4 answers

Scripting exercises and tech interview theory?

Help me prep as an applicant in an imaginary interview for a junior programming position centered around Linux shell scripts, PHP, and Python, with an emphasis on processing text and URLs (availability, routing, etc). [more inside]
posted by jsturgill on Oct 17, 2011 - 10 answers

Help learning regex

I have a brain-block when it comes to Regex and really need to learn it. Can anybody suggest really good tutorials with little exercises to reinforce the info? I've tried so many times to get a grasp and it just escapes me and would be invaluable for school/work since I'm doing a lot of string processing in Perl and PHP. Thanks!
posted by Raichle on Apr 8, 2011 - 11 answers

regex to find strings in strings

I am trying to find a regex which will allow me to find out whether a string exists at least N times in a different string. [more inside]
posted by the_very_hungry_caterpillar on Mar 21, 2011 - 16 answers

A simple problem with a complicated solution

In ColdFusion 7, how do I find every URL in a string containing HTML, and replace them with root-relative versions? [more inside]
posted by The Winsome Parker Lewis on Feb 8, 2011 - 9 answers

Looking for an iPhone text editor with advanced search and replace.

I'm looking for a text editor or word processor for the iPhone that can do things like search for and remove newlines, or replace tabs with five spaces or vice versa. [more inside]
posted by lore on Jan 17, 2011 - 2 answers

Stripping non-alphanumerics in a UTF8 friendly way

My users are likely to enter "oo-11" in a form field when saving data, but search for "oo11" or "o-o11". The hyphen is not important to the data itself. To keep things tidy, I strip the hyphen when saving the data, and strip the hyphen from the search term. I now have a problem with that system. [more inside]
posted by maxwelton on Dec 31, 2010 - 12 answers

Advanced search and replace using notepad++

Help me search and replace all instances of a word that are not preceded by another specific word. [more inside]
posted by oliverst on Sep 10, 2010 - 8 answers

Web based email parser?

Free web based email parser/regex based filter? [more inside]
posted by chrisbucks on Apr 28, 2010 - 2 answers

How to extract a URL from a RSS feed with regex in Yahoo Pipes?

Regexfilter: I need help filtering a RSS feed with regular expressions in Yahoo Pipes. Specifics inside. [more inside]
posted by sharkfu on Apr 23, 2010 - 4 answers

Little Regex Help?

I need a little help with regular expressions. [more inside]
posted by kirkaracha on Mar 10, 2010 - 11 answers

Stand back! I don't understand regular expressions

How do I use regular expressions to express "at least one of each of these, but not necessarily in this order"? [more inside]
posted by specialagentwebb on Nov 18, 2009 - 17 answers

How can I get my two regex subexpressions to match repeatedly?

Regular Expressions: How can I get my two subexpressions to match repeatedly? Right now my pattern matches the first instances but refuses to match anything after it. [more inside]
posted by cowbellemoo on Jul 12, 2009 - 6 answers

Regular expression puzzle time!

Regular expression puzzle time! [more inside]
posted by delladlux on May 4, 2009 - 9 answers

Help with regex exp. for Yahoo Pipes

I'm a librarian who uses Yahoo Pipes in combination with RSS feeds for new books from Amazon to order books. The title tags in each individual item begin as in this example: "#1: A. Lincoln: A Biography". I would like to add a regex expression that will strip out the ranking (#1: or #10:) out of the title so that I can sort the book titles. What I want to remove is the # sign, the ranking number (one or two digit number), and the colon. Any help would be appreciated.
posted by jingo74 on Apr 3, 2009 - 4 answers

Regex Help for Adding +14 to a Series

I'm trying to use Regular Expressions in Textmate to do a Find/Replace. The goal: Find id="1", id="2", id="3", etc. and Replace with a value of +14, so that I replace yields id="15", id="16", id="17" etc. Thank you! [more inside]
posted by pinto on Mar 18, 2009 - 14 answers

My redirect regex doesn't work. How can I fix it?

My redirect regex doesn't work. How can I fix it? [more inside]
posted by kirkaracha on Feb 2, 2009 - 8 answers

change case in bbedit

I have a .csv of names and email addresses in the format: email,firstname,lastname. Some of the names are in ALL CAPS, some are Properly Capitalized. Is there a way to fix the ALL CAPS names in one fell swoop using BBEdit? I'm not a grep/regex guy, so I appreciate your help.
posted by griseus on Jan 19, 2009 - 10 answers

Regex crisis...

Regular Expressions / PHP preg_replace problem. Can this be made to work...? [more inside]
posted by twine42 on Oct 30, 2008 - 13 answers

Help me write a regular expression

regex question. I want to take a list of lines that look like this: This Here is a Title one or more words long / www.something.com and turn it into a list of lines that look like this: <a href="http://www.something.com/" title="This Here is a Title one or more words long"> </a> I have no idea how to do this, though.
posted by Grod on Sep 10, 2008 - 12 answers

Conditional search engine selection in Firefox?

Conditional search engine selection in Firefox search box based on contents (in particular, character set) of the search query? [more inside]
posted by qvtqht on Aug 7, 2008 - 5 answers

Help with a Find/Replace in Word

I’m at the end of my rope trying to figure out how to write a find/replace expression in MS Word (syntax is similar to regex) [more inside]
posted by agent99 on Jul 7, 2008 - 6 answers

Problem with regex order

RegExFilter: Can any regular expression ninjas help me with my this teensy problem? [more inside]
posted by ReiToei on Jun 18, 2008 - 6 answers

Regex woes.

Not quite getting how mod_rewrite regex works when flatting urls with multiple variables. [more inside]
posted by Jezztek on Jun 10, 2008 - 5 answers

Idiot proof RegEx creator tool ?

How can I find a drop-dead simple way of creating Regular Expression strings without having to learn all the underlying mechanics? [more inside]
posted by jmnugent on May 12, 2008 - 35 answers

Powerfull search and replace software?

[Search/replace filter] Is there a free (or really cheap) software that would let me do a batch search and replace where the name of the file is used as pasted text? [more inside]
posted by domi_p on Apr 8, 2008 - 14 answers

Regex Alms for the Perl-less?

Help me composite some regex. (That phrasing makes this question sound way less nerdy than it is) [more inside]
posted by ChasFile on Dec 28, 2007 - 13 answers

I'd like to redirect an entire directory to one specific file.

301 redirectrs in .htaccess: how do I redirect calendar/* to /calendar.html ? I've tried modifying various examples online and they result in either "internal server error" or a 404 caused by incorrectly redirecting /calendar/* to /calendar.html/* . [more inside]
posted by Tuwa on Mar 13, 2007 - 10 answers

Regex question

What's a regular expression to match and replace space characters between curly braces with under scores? [more inside]
posted by pealco on Jan 21, 2007 - 20 answers

REGEXpert help needed!

Regex experts: I need a regular expression to help trim some lines in a text file. I haven't done regex in some time and I'm not having any luck with this. Hope it'll be easy for a wiz. [more inside]
posted by Tubes on Dec 14, 2006 - 10 answers

Regex Heck

Could someone please help me make my php regex less greedy? I need to insert code for an onclick event into the midst of a bunch of tags, and can't get it to work. [more inside]
posted by teaperson on Dec 5, 2006 - 4 answers

Regex assistance for htaccess puzzle.

Regex assistant for redirecting affiliate links. [more inside]
posted by ao4047 on Sep 27, 2006 - 6 answers

Use a regular expression to parse a directory tree

I'm trying to write a regex that gets passed into a java class to validate that a file is in a certain directory structure. [more inside]
posted by toomuch on Apr 11, 2006 - 3 answers

Modifying php-based web calendar to allow UTF-8 (Japanese) input

Probably easy question about PHP and unicode (UTF-8) and RegEx. I'm trying to modify a php webcalendar (VTcalendar) to allow Japanese text in calendar postings. I've found all the variables to get the UTF-8 headers, and so japanese text manually inserted into pages appears fine. But, there's an input validation thingy I don't know how to modify. (short snippet inside) [more inside]
posted by planetkyoto on Mar 29, 2006 - 4 answers

Regex: Text from HTML, no attributes

Regex Madness...filter. How do I pull the text out of an html document without looking at the tag attributes? [more inside]
posted by ph00dz on Mar 26, 2006 - 26 answers

Recursive Regex Fun?

Regexfilter: I'm using PHP and I want to match HTML span classes recursively/in a hierarchy. Help/pointers would be much appreciated. [more inside]
posted by PuGZ on Jan 8, 2006 - 5 answers

Regular expressions to describe incoming search engine URLs?

HtAccessFilter: I’m seeking regular expressions to describe URLs that encompass search engines’ image and video search engines, but not the engines themselves, so that I can block said image and video search engines using “SetEnvIfNoCase Referer” in .htaccess. Also, I’m also seeking to block all incoming requests for one particular URL which is popular with these video and image search engines but which no longer exists – but I don’t want to serve them the normal 404. [more inside]
posted by WCityMike on Jan 5, 2006 - 6 answers

Perl regular expression question

Perl regular expression question inside. Trying to parse a list of items... [more inside]
posted by pornucopia on Dec 21, 2005 - 8 answers

Regular expression question

RegexFilter: I want to strip out all HTML from a string except for approved tags of B and I. [more inside]
posted by xmutex on Dec 13, 2005 - 25 answers

Regular Expressions? PHP? Existing App?

I have a bunch of directories of static HTML files in which I need to: -> Find A -> Find B -> Replace A with B -> Save, close, repeat with every one of the 500 or so files. Anyone got an idea? [more inside]
posted by TiggleTaggleTiger on Aug 29, 2005 - 21 answers

Page: 1 2