Also known as regular expression or regexp, a description of a set of strings, often used for searching and validating strings.

learn more… | top users | synonyms (1)

1
vote
3answers
137 views

Extract/delete all other text than whats inside “ ”, and after string

I'm have a very big data output in a .txt file that looks like this: value1="1",value2="2",value3="test3",value4="4" value1="1",value2="2",value3="anothertest3",value4="4" ...
2
votes
2answers
62 views

OpenOffice Calc regex returns wrong value - what's wrong with my regex?

I have a column of text with values concatenated by my bank, as in a typical monthly statement. Here is an example (column A240): OCT 26 BALANCEPROTECTOR PREMIUM $10.05 I'm trying to set the ...
1
vote
2answers
187 views

Delete specific number of characters after a specific string is found

I have several lines of code and I'm looking for a way to search for a specific string e.g. 'id0=' and delete it and all 10 characters after it, per line. I would prefer a way/macro/addon for ...
1
vote
2answers
138 views

Extract URLS from code statements in JS files

All, I want to extract all URLS mentioned in code statements in all js files in a folder. For e.g. if a js file contains this piece of code: var myURL="http://yahoo.com/signup" //var ...
0
votes
2answers
38 views

Regex Pattern for Proxy

I am trying to match proxy patterns using the following regex: ((?:\d{1,3}\.){3}\d{1,3}):(\d+) It is working well thus far, but is not matching the following: 218.25.249.186:80 Any ideas? Thanks!
0
votes
2answers
76 views

What terms in my regex should I use in place of /b to not be subject to interference by control characters in MS Word or its brethern?

I am using Dynamic Hotstrings as part of my implementation of AutoHotkey. It has been an invaluable tool in the learning of Regular Expressions. Currently I use it heavily for text expansion within ...
3
votes
1answer
81 views

Windows program / tool needed for recursively searching through files referenced from within a file

Following scenario: I browse for unsafeMethodCall() in all my web pages. This method is only unsafe in case that there is a reference of doSomeCrazyAjaxStuff() My web pages are using strong ...
2
votes
1answer
89 views

Is there a way to do rich text formatting with regexes?

I'm trying to edit a large public domain text for publication. One of the things I have to do is make each paragraph's heading bold. Since the heading always begins with an open-paren and ends with a ...
2
votes
1answer
218 views

Using Notepad++ to search/replace PHP code with regular expressions

I would like to update some PHP code into the Joomla framework, replacing things like: $myvar=$_POST["myvar"]; with $myvar=JRequest::getVar('myvar'); This seems like it should be easy enough ...
2
votes
1answer
111 views

Command that behaves like Emacs' align-regexp

Let's say you have a properties file that looks like this: prop1 = value1 longerprop = value2 reallylongpropthathasnomeaning = val3 shorterprop = val4 and you want to "beautify" it into this: ...
1
vote
1answer
102 views

regex redirection to safe url

I have several thousand URL's in a CMS formatted like: /post/en/1539/A+Week+in+Paris+61.html I'm moving all of the data to wordpress. Where the URL structure will be formated as: ...
1
vote
1answer
43 views

Is there a way to detect regular expression support in a htaccess file?

I use to following rewrite rule to pass the whole url to an php script: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*?)$ ...
1
vote
1answer
66 views

Interactive regex find highliting in Notepad++

How can I make Notepad++ highlight my regex matches as I type?
1
vote
1answer
295 views

Find/replace underscored words to camelCase words using regex?

I have a ton of text files that are tagged with underscore-connected words like @some_text, but I would like to convert those to tags in camel case, like @someText. How can I use regex (either in vim ...
1
vote
1answer
439 views

Regular expression replace in Textpad where search term spans multiple lines

Is it possible to do a regular expression search and replace in Textpad where the search term spans multiple lines. e.g. document contains: Hello ab_c D_EF 12_3 World I would like to replace ...
1
vote
1answer
406 views

How does adblock regex work?

Here I found adblock regex explanation. I wish to block all images containing "bbelements" in their url, but neither "bbelements" nor "*bbelements*" worked for me. Surely it must be something very ...
0
votes
1answer
30 views

How do I use regex curly braces in SublimeText2

SublimeText's regex parser doesn't seem to work like others. If I write (.*{50, 51})+, or (.*{50,})+, or (.*{50})+, it doesn't grab sets of 50 characters. I think it tries to match the { as a ...
0
votes
1answer
45 views

Expression help for Find and Replace in Notepad++

I'm fuddling my way through using regular expressions in notepad++ with some .xml files, and may have gotten a little over my head. I'm currently trying to search for anything that starts with: ...
0
votes
1answer
41 views

Nano syntax highlighting malformed regex?

I found this javascript syntax highlighting file for nano on google code, downloaded it and included it in my /etc/nanorc file: File: /usr/share/nano/js.nanorc ## all *js files ( e.g. Firefox ...
0
votes
1answer
200 views

Regex to Increment a Number by 1 in Visual Studio 2005

How would I use a regex in Visual Studio 2005's search / replace to increment a set of numbers by 1? The search term is either {:z} or {[0-9]+}. I am unsure of the replace term. Using "\1" simply ...
0
votes
1answer
81 views

Excluding preceding characters from a “Find”

I'm attempting to automatically format portions of a significantly sized document. For one, I'm attempting to apply Heading 1 to all headings in the format of: 1.1 Heading 1 and Heading 2 to: ...
0
votes
1answer
139 views

Notepad++, my regex that works elsewhere, seem not work with Notepad++ search

Hello i got following regex height="(\d*\.\d{3})\d*cm" And problem, while it works on site i did designed it http://gskinner.com/RegExr/ it wont work with notpad++, could someone help me ...
0
votes
1answer
285 views

How can I find and replace multiple blocks of text in multiple documents all at once?

I tried searching for this everywhere but couldn't find any solution. I have 100 html pages with various text to translate. I have also the translated text ready on a word document. So what I have to ...
0
votes
1answer
90 views

Which is the equivalent of this JGsoft regular expression in UltraEdit?

How do I replace the XML expression ' with ' ? The problem is that the text is divided in multiple formats for the characters: \n - 10 13 & \n apos; &a \n pos; I did the ...
0
votes
1answer
197 views

Pattern matching gnmap fields with SED

I am testing the regex needed for creating field extraction with Splunk for nmap and think I might be close... Example full line: Host: 10.0.0.1 (host) Ports: 21/open|filtered/tcp//ftp///, ...
0
votes
1answer
238 views

Using RegEX To Prefix And Append In Notepad++

I found this question on StackOverflow. It worked great but I also need to include lines that have non-alphabet characters in it like: some_name some.name And add prefixes like this: ...
0
votes
1answer
451 views

regex pattern for various number groups

I am parsing a list of code numbers, they have a pattern of 12345.1211. They are space delimited. They sometimes will have a space followed by one - three addition number patterns like: 1221.121 11 ...
0
votes
1answer
266 views

Regex editor application for Mac

I'm working with regular expressions on Mac and I'm using: http://reggyapp.com/ But it does not show the exact matches numbered. I'm looking for other applications. Something similar to regex ...
0
votes
1answer
160 views

OpenOffice.org Writer RegEx

I have some badly formatted text which I am attempting to reformat using the OpenOffice.org Writer's Find/Replace functionality which supports regular expressions as defined here. The problem is some ...
0
votes
1answer
135 views

Is there ANY possible way to make TextMate's ⌘-F regex by default?

TextMate newbie here. I hate to have to grab my mouse to click that Regular Expressions box nearly every time I search. EDIT: the Regex check box becomes unchecked anytime after using ⌘-F in Safari. ...
2
votes
0answers
327 views

LogRotate use regex for filename

I have a custom logging class that creates a log for each instance of the process and adds a unique id to the log file name, example: process.1234.log process.1235.log Also I can add a date/time ...
1
vote
0answers
25 views

KeePass wildcard in url

I started using Keepass yesterday and it's really useful however I cannot find a way to add wildcard into the url... I want one key being used on all url(s) that met the following rule: ...
1
vote
0answers
244 views

Midnight Commander copy/rename with replaced characters

I would like to copy/rename (F5/F6) with regex (regular expression) mask all the tagged files or directories with names containing space or á or é characters replaced with underscore and a and e ...
1
vote
0answers
183 views

Changing puttyTRAY's URL regex in order to match URLs across lines separated by tmux window boundaries

I use puttytray to access a shell account on which I have a tmux instance running. Inside tmux, I have irssi running in a window. When people post long URLs in IRC, however, it's annoying since these ...
0
votes
0answers
31 views

Notepad++ command to tweak document path and filename

In Notepad++ 5.8.6, is there a way to copy to the clipboard the current document's full path and filename after applying a regular expression replace? For example, I can do Edit > Copy to Clipboard > ...
0
votes
0answers
90 views

Find and replace with lookaround in Sublime Text 2

I'm trying to fix a nasty issue left for me by a previous developer. Evidently, he didn't "believe" in using quotes around dictionary keys, so I now see stuff like: $_REQUEST[username] and error ...
0
votes
0answers
53 views

How to replace file strings with regexp in Linux

I'm trying to replace the specific numbers and use this command: sed -e 's/[0-9]\{12\}/ /g' file.log but nothing happens. As U can see this expression should replace all numeric occurrences with ...
0
votes
0answers
44 views

Sublime Text 2 incrementor plugin

I'm trying to replace some numbers with the incrementor plugin in my JSON file that looks like this: { "name" :"Mawlid al-Nabi", "date" :"2013-01-24", "ID" : "912" }, ...
0
votes
0answers
15 views

Using the 'ed' editor, how can I print the first 20 matching lines?

Given a file of humongous size, I can edit with ed, then issue the following command. g/real/p Which will print out all lines containing 'real'. What I want to do is print the first 20. I know ...
0
votes
0answers
243 views

RegEx and RTMP for XBMC & LiveStreams

I love this idea/tool and I'd like to master it: LiveStreams (video) Add-on - an alternative to .strm files I downloaded C420's LiveStreams addon and it works great! I have since tried applying the ...
0
votes
0answers
26 views

How to grab data from nbtscan to csv file

I am using nbtscan -s , 192.168.0.1-254 -t 20000 to return the list fo machines that I need to export to csv but it is returning a different number of columns when I use a regex in PHP echo ...
0
votes
0answers
77 views

Outlook 2010 Rule to filter From field

I need a filter to trash all incoming mails where the From field begins with "DR" plus a non-alphanum character. I tried filtering for "^[dD][rR][. ].*" but it seems Outlook is too stupid to ...
0
votes
0answers
102 views

XML text transformation

I have a large file part of which is like below: <DataGroup xsi:type="ReportDataGroup"> <SmartReportTemplate DescriptionContentType="text/plain" IsActive="true"> <Name ...
0
votes
0answers
273 views

Regex to find a string in GrayLog2

I am trying to find a regex that will search for a string in Graylog2: access denied For example, I want to search for the string: Login failed: Access Denied I have tried: \Qaccess ...
0
votes
0answers
101 views

Textpad regex cursor placement after the replaced text

I have the following regex to find a date and replace it with some text plus the tags but the subsequent replaces are finding the replaced text instead of the next date Regex: ...