I need a regex for the following combination [closed] - regex

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
mission_id: a498094578a
mission_id: a493453456
mission_id: 498343454a
mission_id: 34534535345
From the above 4 mission_id's I need your help in writing a regex pattern which covers all the four mission_id but need to select only the numbers.
So one the first one - need to exempt 'a' and only the numbers.

mission_id:\s*\w?(\d*)\w?
That should work; maybe add any flags you need for parsing multiline text or whatever.
www.regexr.com is a great resource for trying out RegExps

Related

How do I write a Regex pattern to match the following strings? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have string that could come in several forms
“PSM000216556880035450088|TRF”
“VNM000216556880035450088|TRF FROM MACK”
“NXG000216556880035450088”
“Transfer from josh SL000216556880035450088 to jack”
“X00000216556880035450088 0098123 TRANSFER 789121”
I need a Regex pattern that could get the string that starts with PSM, VNM, NXG, SL00 or X00.
i.e. in 1, I need “PSM000216556880035450088”. This string is the reference and it is what I need. It can be found in any position in a sentence and sometimes the reference might not be separated from the other words by a space. Sometimes a special character can be used as a separator. i…e. in 2 “VNM000216556880035450088|TRF FROM MACK”.
I will be using the Regex in my VB.NET code.
What about this with multiline flag?
((?:PSM|VNM|NXG|(SL|X)00)\d+)

How to “inverse match” with regex without content? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I have read How to "inverse match" with regex? and i would like to know if i can apply it to a non-content regex. In particular i'm talking about: ^[A-z0-9+\/]{44}$
I tried https://regex101.com/r/NmOs7Z/1 but it does not work
I didn't get exactly what you really, but from my understanding you want to match the two lines in your demo
So what i did :
^(?![a-zA-Z0-9+\/]{44}).*$
Demo

Regex expression to replace string with * [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I need to convert string like this to
ABC_464_aDE.hmi_2df
to ABC464aDE.* that is want to remove all _ and add * at the end after dot. And my project requirement is to do this using regex. Please help to sort this out.
Thanks
If you are using C# the you can use this code
txt=Regex.Replace(txt.Replace("_",""), #"\.\w+", "");

Regular Expression for set of double number with semi-colon delimeted [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Today I attemped several time to build regular expression to validate a set of double number with semi-colon delimeted following example data below:
Should match:
123.1234567890
123.1234567890;123.1234567890;123.1234567890
Should not match:
123.1234567890;
123.1234567890;123.1234567890;123.1234567890;
If you have any idea, Could you please help me ?
Thank you very much
You can try this:
(\d+\.\d+;)*\d+\.\d+(?![\d;])
to match the whole 123.1234567890;123.1234567890;123.1234567890
\d+\.\d+(?![\d;])
to match just the last.

Regex Expression Required [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
i am new to this regex thing, how can we build regex expression for following thig
input==>[User:1490474408:michaelayliffe]
output should be ==>1490474408
input will be anything like below:
1.[User:1490474408:michaelayliffe]
2.[User:12345:dfhdfhdf]
3.[User:56789:utyutyutyu]
Output should be middle value.
Please reply.
(?<=\[User:)[^:]+
Using lookbehind should work for you.
/\d+/g
It is find digits those are middle of your string