Regex: Difference between revisions
From DWIKI
m Match IP address |
m →FAQ Tag: wikieditor |
||
| (One intermediate revision by the same user not shown) | |||
| Line 8: | Line 8: | ||
*https://regex101.com/ | *https://regex101.com/ | ||
=Syntax= | |||
==(?:)== | |||
Non-capturing group, so creating a back-reference | |||
=Tools= | =Tools= | ||
| Line 20: | Line 24: | ||
==Match IP address== | ==Match IP address== | ||
'\d{1,3}[-x.]\d{1,3}[-x.]\d{1,3}' | '\d{1,3}[-x.]\d{1,3}[-x.]\d{1,3}' | ||
==Replace one or more spaces== | |||
's/\s\s*/FOO/g' | |||
Latest revision as of 15:10, 19 September 2025
Regular expressions
Links
- Regex reference
- http://gnosis.cx/publish/programming/regular_expressions.html
- http://www.zytrax.com/tech/web/regex.htm
- http://www.regular-expressions.info
- https://regex101.com/
Syntax
(?:)
Non-capturing group, so creating a back-reference
Tools
- txt2regex
ZZ
pcre
FAQ
Match IP address
'\d{1,3}[-x.]\d{1,3}[-x.]\d{1,3}'
Replace one or more spaces
's/\s\s*/FOO/g'
