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)

3
votes
1answer
95 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
38 views

find using regexp and echo matches

I have about 50 users in /home/ directory and I have cloned a git repository to everyone: Executed at /home/ as root user: find . -maxdepth 1 -type d ! -name . -prune -exec git clone ...
2
votes
1answer
36 views

make \w match characters like ÄÖÜäöüß?

Is it possible to customize the behavior of regex metacharacters for character classes like that? (In Sublime, or more generally.)
2
votes
1answer
114 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
342 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
137 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
133 views

How do I use wildcards in Notepad++ to 'find and replace' all of this text?

I would really appreciate some help with this. I am working with a large corpus of text that has been marked-up with XML script and I need to tidy some things up. More specifically, there are several ...
1
vote
1answer
27 views

Is it possible to sed -i from a text file to another text file?

I'm coding a shell script on my Debian box and there's a line on the script that needs to delete some emails from a textfile that is full of emails, like this: sed -i ...
1
vote
1answer
189 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
834 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
1answer
71 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
528 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
671 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
51 views

Find and replace using wildcard/regex characters in Notepad++

I have an HTML Code with the following structure: <td class="tar"> <div class="bubble in"> Some Text, I want to keep! And maybe even an image: <img src= ...
0
votes
1answer
28 views

Using Notepad++ search/replace PHP code with regexp

I don't have experience in regexp so I hope someone will able to help me to change faster than by hands Need to replace objects to arrays like $variable -> child; OR $variable->child to ...
0
votes
1answer
76 views

Microsoft Office 2013: Regular Expressions

I read the articles on RegExp in Office already. My wish is to manipulate quoted strings. I need to replace the quote characters with parentheses. For example: "Hello World." should be replaced as ...
0
votes
1answer
37 views

How to navigate PHP-based pagination with WGET?

I'm trying to come up with a list of possible names for our next baby boy and have been looking through the site IndiaParenting. Each name on the site has a detail page at a URL like this one ...
0
votes
1answer
61 views

Using regex to select word before another word which starts with a capital letter

I would like to select all adjectives in a German sentence. As all German nouns are capitalized, I though one way would be to look for capitalized words and select the previous word. If the selected ...
0
votes
1answer
36 views

Weeding out invalid html code with regex

I need a pcre regex that will select all html img tags without a src part. Long story. With help I got to (?-s)<img(?!.*?src).*?\/> which worked fine until a line got a second img tag WITH src ...
0
votes
1answer
70 views

How to grep values under columns

How can I grep for a specific column name and display the value underneath that column. Sample data: StandByFile StandByPg StandByLSN StandByRcvBufUsed S0082160.LOG 621668 ...
0
votes
1answer
131 views

Find duplicate phrases - any tool or regex

I've got a long document, and I suspect that some phrases (one or multiple sentences) are identical or at least similiar. Is there some way to find these repetitive phrases? Some tool or regex?
0
votes
1answer
181 views

Notepad++ regex highlighting

I'd like to be able to highlight entire lines in notepad++ by keywords, but these keywords would be added in the end of each line. I tried with the available mechanism of "User Defined Language" ...
0
votes
1answer
67 views

How can I replace one Youtube URL pattern with another via FoxReplace?

Youtube changed its layout again. Now to get to a user’s uploads page you have to click on their nickname, then on the “Videos” tab, and then filter by uploads-only from a dropdwon menu. If you also ...
0
votes
1answer
56 views

To Search data in a given range in notepad++

I have data like this: ABC DEF 123 456 STU 567-89 XYZ 234 123 345 789 ERT FGHT TYUI FGHT 456 HHKHFS NOR TEST TEST1 5678 NOT TEST Trying to format it as below output in which I can use to ...
0
votes
1answer
61 views

How to extract everything between <table> and </table> in multiple HTML files

I have been trying to extract this data for a couple of hours without luck. I either want to just extract all the table tags from the HTML and save them to a separate file or everything between these ...
2
votes
0answers
523 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
245 views

Nginx rewrite to remove first (generic) path node

I am currently writing a dispatcher that will dispatch different URLs to specific service URLS. I essentially want to dispatch something like: POST ...
1
vote
0answers
44 views

Script to port specifc data from doc1 (notepad++) to specific place(s) in doc2

I really appreciate your help with a windows script or regex function that ports specific data from doc1 (xml in notepad++) to specific place(s) in doc2 (notepad++). I'm running win8. Thank you in ...
1
vote
0answers
404 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
264 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
20 views

I want to delete everything between two HTML tags with Notepad++ regex

I have this code text: <div class='post-outer'> <article class='post hentry' id='311698957029370981' itemscope='' itemtype='http://schema.org/BlogPosting'> <h1 class='post-title ...
0
votes
0answers
8 views

Upping all seconds of X value

I have a subtitles file. What regex should I use in Notepad++ to up every line of 2 seconds? 00:01:15,444 --> 00:01:17,613 should become 00:01:17,444 --> 00:01:19,613
0
votes
0answers
9 views

LDAP role/group membership

We have many users registered in our LDAP auth. So far we've only stored login and mail-related information in this LDAP. In our main application (Play! Framework), we needed to modelise roles ...
0
votes
0answers
23 views

Multiline find and replace wrapper with wildcard inside

I'm trying to put a wrapper around a bunch of fields that already exist. I want to convert this: <div class="editor-label"> @Html.LabelFor(Function(model) model.FirstName) </div> ...
0
votes
0answers
29 views

How to use backreferences in oracle sqldeveloper find/replace

How do you use backreferences when doing regular expression find/replace in Oracle SQLDeveloper? \n doesn't work for me and neither does $n.
0
votes
0answers
23 views

RegEx formula for copying comma-separated target glossary terms to a new line

I have a tab-separated two columns glossary that contains mostly target, rarely source terms separated by a comma and followed by white-space like: abarbeiten-TAB-execute, perform and denken, ...
0
votes
0answers
15 views

mRemoteNG Panel equal to Name

I wanted to have the Panel=%name% or something similar in mRemoteNG. Is it possible to do this within the program? For now I resorted to using Regex find replace in an editor on the confCons.xml file, ...
0
votes
0answers
30 views

How to define new scopes using arbitrary delimiters in Sublime Text 2

TL;DR: How do I bring Ruby-like comment scope to plaintext files for sublime text? I want to customize my plaintext file look in ST2 by allowing comments. So far I have managed to extend the ...
0
votes
0answers
49 views

Can I apply a regex to file filter on Notepad++?

I have a folder full of xml files, and I want to search through them for a particular ID. However, I only want to search the files that are of the format hello_apple_01.xml, hello_apple_02.xml... ...
0
votes
0answers
37 views

How to identify tab delimited columns in Multitail

I'm trying to remove certain columns from my logs, where columns are delimited by tabs. Here are some ways I've tried to remove the second column which didn't work. multitail -kc " " 2 my.log ...
0
votes
0answers
59 views

Apache mod rewrite testing tool (no online tools)

I've tested some great RegEx standalone tools and found a couple of mod rewrite online tools, but is there some standalone tools for testing apache mod rewrite definitions? Ideally, I want something ...
0
votes
0answers
103 views

Saltstack regular expression to target all except

I'm having trouble using regex with salt to target every minion except one. I have tried every example I can find and exhausted my limited understanding of Perl regex. I expect this to target every ...
0
votes
0answers
47 views

TextAnalysisTool.NET equivalent for OS X

I've used TextAnalysisTool.NET in the past for analyzing log files on Windows machines and found it incredibly useful. I love the simplicity+power that it achieves for dynamically grepping log files, ...
0
votes
0answers
26 views

Looking for a solution to discover common text patterns in multiple strings

I'm looking for a solution where I can examine thousands of strings that share some similarity and have it discover appropriate regex pattern(s) that will give a 100% match on all strings? The catch ...
0
votes
0answers
42 views

Match the First Occurrence In Text Using Boundaries

I need some help as I have been trying to figure this out all night. I need to match the first occurrence in an article. Something like this... The online marketing game has changed since the ...
0
votes
0answers
79 views

Emacs rx semantics

I have the constructed the following regular expresion using rx.el module (rx (and bol (0+ (not (any "#" "[]*" "\n"))) " " (or "#" "[]*") " ")) I want to change the string []* for the string ...
0
votes
0answers
78 views

Firefox Extension To Save To Folder Named After Text On Webpage

I am wanting to find or create a Firefox Extension that can create and save to a folder, based upon the text in a page's tag. I would want it to do the following: Check the page's html for a ...
0
votes
0answers
63 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
121 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
676 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 ...