i'm using notepad++, , need take part of many different lines of text, pretty similar, , put them in line.
here's example of have
- '@and b $testing123.<playeruuid> = false' - '@and b $thisisatest.<playeruuid> = false'
and want turn into
- '@and b $testing123.<playeruuid> = false' - '@setbool $<playeruuid>.name testing123' - '@and b $thisisatest.<playeruuid> = false' - '@setbool $<playeruuid>.name thisisatest'
i thinking of using find/replace regular expression this:
find:
- '@and b $x.<playeruuid> = false'
and replace with:
- '@and b $x.<playeruuid> = false' - '@setbool $<playeruuid>.name x'
of course isn't in regex format, i'm trying do, , don't know start.
so in summary, want take part of pattern , stick line of text, in bulk?
i'm not sure how explain well. i'm sorry lack of detail.
you can achieve using find , replace (ctrl + h) in regex mode:
find:
- '@and b \$(.*)?\.(<.*?>) = false'
replace:
- '@and b \$$1.$2 = false'\n - '@setbool \$$2\.name ($1)'
the quantities in parentheses called capture groups, because regex engine captures contained in them while matching. capture groups can used in replacement $1
, first capture, or $2
, second capture.
here screen shot:
Comments
Post a Comment