regex - Regular Expression Notepad++ replace -


I am trying to change only the 'Remove' string in the code for this block:

  & lt; Table asldkjf & gt; Remove Remove Remove & lt; Tr & gt;   

The problem table is keeping the string 'asldkjf' inside the tag.

I

  & lt; Have tried to replace table [^ & gt;] *> [^ & Lt;] * & lt; TR & gt;   

with

  & lt; Table [^ & gt;] * & gt; & Lt; Tr & gt;   

and I found

    

This is incorrect because 'asldkjf' has been replaced with '[^ & gt;] *'

  & Lt; Table [^ & gt;] * & gt; [^ & Lt;] * & lt; TR & gt;   

with

  & lt; Table $ 1 & gt; & Lt; Tr & gt;   

and I found

    

This is also wrong.

Use the capturing group and the pattern around, whose text you want to use in the replacement. You can refer to them with $ n , where n is the number of capturing group.

For more information about how the capturing group works,

What to Search:

  (& lt; Table [^ & gt;] * & gt;) [^ & lt;] * (& lt; tr & gt; ;)   

with Replace:

  $ 1 $ 2    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -