英文:
how i can seperate only mobile number from this expression in notepad ++
问题
"GET /mspProducerM/sendSMS?user=userjesus&pwd=jcallshttp&sender=JCALLS&mobile9159525910&msg=Promise%20for%20Jan,%2002%20The%20Lord%20blesses%20His%20people%20with%20peace.-%20Psalm%2029:11.%20For%20Prayers%20and%20Queries%20call%20044-45999000&mt=0" 中的文本中提取了 "9159525910"。
英文:
103.199.145.50 - - [02/Jan/2020:04:42:34 +0530]
"GET /mspProducerM/sendSMS?user=userjesus&pwd=jcallshttp&sender=JCALLS&mobile9159525910&msg=Promise%20for%20Jan,%2002%20The%20Lord%20blesses%20His%20people%20with%20peace.-%20Psalm%2029:11.%20For%20Prayers%20and%20Queries%20call%20044-45999000&mt=0
HTTP/1.1" 200 42
like i need to extract text, 9159525910
答案1
得分: 0
你可以尝试以下的查找和替换,在启用 DOT ALL 模式的情况下使用正则表达式:
查找:\b\d+.\d+.\d+.\d+ - - [[^]]+].?".?\bmobile=(\d+).*?" \d+ \d+
替换:$1
Demo
这里的方法是匹配输入的整行,然后捕获手机号码。替换部分只是捕获的电话号码。
英文:
You may try the following find and replace, in regex mode, with DOT ALL enabled:
Find: \b\d+\.\d+\.\d+\.\d+ - - \[[^]]+\].*?".*?\bmobile=(\d+).*?" \d+ \d+
Replace: $1
The approach here is to match the entire line of your input, and then capture the mobile number. The replacement is just the captured phone number.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论