Jump to content
  • 0

np++ Replace by using Regular expression


QQfoolsorellina

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

Good day, everyone.

I have a trouble in Regular expression I don't know how to input the correct command.

What I want to do is to replace all the mvp 's dMotion filed with value 0 in mob_db.txt.

I think the condition of mvp is MEXP >0,but I suck at use Regular expression so I need

someone kindly help to tell me the right RE code .. thank in advance.

Edited by QQfoolsorellina
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

I don't know how np++ work with regular expression but it should be something like this:

search: ,0x([a-fA-F0-9]+),(\d),(\d),(\d),
repace: ,0x\1,\2,\3,0,

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

I don't know how np++ work with regular expression but it should be something like this:

search: ,0x([a-fA-F0-9]+),(d),(d),(d),
repace: ,0x1,2,3,0,

np++ use RE

search result : not wroking ! only TREASURE_BOX can be searched

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

Hi , I can't understand how the R.E. work but I want replace all custom msg_txt

1. in atcommand.c

msg_txt(8XX) ~ msg_txt(9XX) replace with msg_txt(18XX) ~ msg_txt(19XX)

2 in msg_athena.conf

8XX: XXXXXXX ~ 9XX: XXXXXXX replace with 18XX: XXXXXXX ~ 19XX: XXXXXXX

anyone can tell me how to input RE syntactic structure? , thanks.

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  806
  • Reputation:   220
  • Joined:  03/13/12
  • Last Seen:  

try these

in atcommand.c

search: msg_txt\(([89]\d\d)\)

replace : msg_txt\(1\1\)

in msg_athena.conf

search: ^([89]\d\d:)

replace: 1\1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

try these

in atcommand.c

search: msg_txt\(([89]\d\d)\)

replace : msg_txt\(1\1\)

in msg_athena.conf

search: ^([89]\d\d:)

replace: 1\1

thank for your help both work peferctly

Edited by QQfoolsorellina
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...