Click here to Skip to main content
15,880,651 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
please programmers, I am not goot atall when it comes to regex.
please, can you provide the regex that match this string " X|3.20|S|0"

What I have tried:

nothing yet as I don't know it.
Posted
Updated 29-Sep-18 10:43am
Comments
[no name] 28-Sep-18 15:22pm    
it should search also "X/X|3.20|S|0"
Patrice T 28-Sep-18 15:45pm    
Use Improve question to update your question.
So that everyone can pay attention to this information.

Try:
(.+?\|){3}0
Probably won't help you though - you need to look at a whole load more data samples...
 
Share this answer
 
Not clear what you trying to do, but you also can try this regular expression
\b((X/)?X\|[0-9]\.[0-9]{2}\|S\|[0-9]{1})\b


Example: cp_reg_string between X|3.20|S|0 | C# Online Compiler | .NET Fiddle[^]
 
Share this answer
 
This one should do:
\sX\|3\.20\|S\|0


Just a few interesting links to help building and debugging RegEx.
Here is a link to RegEx documentation:
perlre - perldoc.perl.org[^]
Here is links to tools to help build RegEx and debug them:
.NET Regex Tester - Regex Storm[^]
Expresso Regular Expression Tool[^]
RegExr: Learn, Build, & Test RegEx[^]
Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript[^]
This one show you the RegEx as a nice graph which is really helpful to understand what is doing a RegEx:
Debuggex: Online visual regex tester. JavaScript, Python, and PCRE.[^]
This site also show the Regex in a nice graph but can't test what match the RegEx:
Regexper[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900