Notepad++ regular expression [closed] - regex

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
{\i that}
and,
{\i it is this}
I cannot find the way to delete extra stuff from expressions so as to keep only at the above example the words "that" and "it is this".
Can you help me with the regular expression needed?

Try each of the following two expressions (the first one is more efficient if the text between { and } can't contain a } symbol):
\{\\i ([^}]+)\}
Or,
\{\\i (.+?)\}
and in both cases replace with \1.

echo "{\i it is this}" | sed 's/{\\i //;s/}//'

Search : \{\\i (.+)\}
Replace with : \1

Related

Regular expression for all lower case with _ allowed [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
what is the regular expression to validate a string. the string should contain
all lower case
_ is allowed in the string.
Thanks in advance.
You need to use regex pattern
^[a-z_]*$
You can use a POSIX class as an alternative to a simple character class to achieve this:
[[:lower:]_]*

regualr expression letters and word match [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
apologies for what is probably a really simple question but I am a complete noob when it come to using regular expressions.
I am trying to create an expression that matches some set criteria together, and although I can find the code to validate these things separately I'm struggling to understand how you put it all together.
What I am looking for is an expression that validates an entered code:
It will always a start with either OR or TR and then you will have 6 digits after that e.g. TR002563
Any help would be greatly appreciated.
Try this regex:
/^(?:O|T)R[0-9]{6}$/
You can use this regex:
/^[OT]R[0-9]{6}$/

regex match anything between {esbmsg:header:xxxxxx} [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
How to match anything between {esbmsg:header: and }
like xxxxxx could be any string {esbmsg:header:xxxxxx}
Try with:
{esbmsg:header:([^}]*)}
Where [^}]* matches everything that is not } character.
Try this regex
{esbmsg:header:(.*)}
It will also allow you to have any character in value.
Well, if you want to capture only the content of your expression (the "xxxxx" part) the best approach is to use positive look ahead:
(?<={esbmsg:header:)[^}]+
Depending on how your content looks you might have to tweak the [^}] part. For further information on regex (or a detailed explanation of the expression above) I recommend the following:
Regex reference
Regex tutorial

RegEx - Add new conditions to existing regex [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I currently have this Regex:
.*[a-z]$|.*[A-Z]$|.*[0-9]$
I need to add the following to the existing - /:.#[]()
Does anyone know how to do it?
You don't need multiple OR conditions. Have only one and include special characters also:
[0-9A-Za-z\/#:.()\[\]]
Per your comments, this should do it for you:
^[a-zA-Z0-9/:.#\[\]()]+$
This will match a string containing only the characters you've specified.

How can I trim a string starting with a specific expression? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
How do I find and delete the utm_content parameter from all the urls in a file using Notepad++?
Sample data:
http://example.com/content1.html?utm_content=product1
http://example.com/abc2.html?utm_content=homepage
http://example.com/test/?utm_content=sku1234
http://example.com/runapp?utm_content=31231KS
http://example.com/blabla?utm_content=nl-laptops-tablets
Desired result:
http://example.com/content1.html
http://example.com/abc2.html
http://example.com/test/
http://example.com/runapp
http://example.com/blabla
Note: As I understand Notepad++ regular expressions use the standard PCRE (Perl) syntax.
As far as I understand your needs:
search for:
\?utm_content=.*?"
and replace with "
Search for \?utm_content=\w+ or \?utm_content=.* and replace it with a zero string if this is the only one parameter.
Use standard Search & Replace (Ctrl + R)
Edit:
Search: utm_content
Replace:
Press find and then press Replace Rest.