regex - How to do a proper search/replace using GREP Regular Expressions in a text editor? -
I am trying to run some regular expression (GRP) on the text file of approximately 4K lines. The main part that I should replace should look like this:
1, "an internet-ready resume", 1,2, "", "
And I should look at it like this:
- gt; title & gt; An Internet-Ready Resume & lt; / title & gt; & lt ; Category & gt; 1 & lt; / category & gt;
So far , This is what I was trying to gain:
[0- 9] {1} \, \ "* \", [0- 9] \, [0 -9] \, \ "\" \, \ "
You should start doing one. Many useful resources are online so you can see:
- You do not have to avoid everything (such as commas or quotes)
- asterisk
* < / Code> it does not mean anything , but zero or more times
- any letter is
.
character.. *
means any number multiple times (or anything ) - if you need to make those places where you The atoms of what you are looking for need to set those atoms using
(& lt; atom content & gt;) where
& lt; Atom content & gt;
is a bit of a regexp
To start, try a tip: instead of \ "* \"
". * "
; Check it out.
Also keep in mind that part about the replacement will depend on the text editor / tool that you are using. Typically x (1) (b)
(where a, b is regexp atoms) such as x \ 1y \ 2z
with a regexp xaybz
.
Comments
Post a Comment