RegEx with notepad++ - regex

100.
101.
102.
guys this is my text and i want to change like this:
<tag>100.</tag>
<tag>101.</tag>
<tag>102.</tag>
My RegEx is:
[0-9][0-9][0-9]\.
Replace with:
<tag>\1</tag>
But it does not work :(
I could not see the numbers and dot sign.
Thanks in advance

You need some (capturing) parentheses;
Re: (\d{3}\.)
Replace <tag>\1</tag>

You're missing the \. in your brackets. Try this $regex = ":[\d\.]+:".

Related

Dreamweaver regex finding and replacing text?

I want to ask how the format regex to change each word like this ?
ex:
AAAAAA*BBBBB
Bad*Good
Black*White
ss+bb*cc+gg
result:
(AAAAAA*BBBBB)
(Bad*Good)
(Black*White)
ss+(bb*cc)+gg
thanks, sorry for my english
/([a-zA-Z]*\*[a-zA-Z]*)/g
and replace with:
($1)
DEMO: https://regex101.com/r/fP6gN4/2

Easy regular expression- please correct

I have AUD0.7195.
I want to mach AUD in $1 and 0.7195in $2.
The amount may vary. It can be positive integer.
I have tried with:
/([A-Z]{3})(\d{+}\.?\d*)/ms;
But it matches nothing. What is wrong? Thanks!
([a-zA-Z]+)(\d+(?:\.\d+)?)
Use this.Yours does not work as \d{+} does not act as quantifier.
\d{+} doesn't make sense and should be \d+
Could you please try this:
my $string = "AUD0.7195";
print "$1\t$2.......\n", if($string=~m/^([\w]{3})([0-9\-\.]*)$/g);

How can I build the regex to match a string NOT containing "au=1"?

As the title says... :)
Could you help me to build a regex to match a strings NOT containing "au=1"?
I was playing with negative lookahead with no luck but I'm quite sure that I should get something using that.
Thanks!
Using negative lookbehind:
?<!au=1
Negative lookahead will only look ahead, making the regex match match against au=1match. You should read up on the differences in more detail here.
You can also just match against au=1 and negate the result:
if(!Regex.IsMatch(input, #"au=1"))
{
// blah blah blah
}
Prefix the pattern with ! to negate it:
!au=1
I finally did it with this regexp
^(?!.*au=1).*$

Regex: How Do I Edit my Regex in order to Strip % Signs?

I need some Regex help.
I've got a series of numbers. For example: 2010 95 34% 22 55%
I use this Regex to put add quotation marks and commas:
([\d.]+%?)
'$1',
It works great. But, I need to strip the % sign. How do I edit the above Regex to do so?
Thank you!
-Laxmidi
Try
([\d.]+)%?
With the same replacement:
'$1',
You just need to move the % outside the capturing group, so that it's not included in the value that's used for $1 in the replacement...
([\d.]+)%?
This RE: ([\d.]+)%?
What language are you using?

What is the REGEX for a number followed by a period?

EG something of the form: 12. or 1. or 143.
Thanks.
The following will match all of your examples, and should work with any regex implementation:
[0-9]+\.
This is it:
^\d+\.$