Skip to navigation Skip to content
Simon Technology Blog
  • Architecture
  • Cloud
  • Database
  • Develop
  • Hardware
  • Industry
  • Language
  • Mobile
  • Opensource
  • OS
  • Web
Main Navigation

Category: Regexp

Regular expressions, also known as regular expressions. (English: Regular Expression, often abbreviated as regex, regexp or RE in the code), a concept of computer science. Regular tables are usually used to retrieve and replace texts that conform to a certain pattern (rule). Many programming languages support string manipulation using regular expressions. For example, a powerful regular expression engine is built in Perl, and the Java language comes with it. The concept of regular expressions was first popularized by tools in Unix (such as sed and grep). Regular expressions are usually abbreviated as “regex”. The singular includes regexp and regex, and the plural includes regexps, regexes, and regexen.

Regular expression – regular expression does not work in Go

Please forgive me for being an amateur of regular expressions, but I am really confused, why this is not a piece of code that does not work in Go

package main
import (
“fmt”
“regexp”
)
func

October 18, 2021By Simo Regexp expressions, Medium, regular, unreasonableLeave a Comment

Regular expression detects if the IP address and port number are legal

Regular expressions to check whether the IP address and port number are legal, the code is as follows:

Regular expressions to detect IP address

public static bool CheckAddress(string s)

October 18, 2021By Simo Regexp and legal, detection, expressions, IP addresses, numbers, ports, regularLeave a Comment

Regular expression – problems when capturing text between two letters

I use the following regular expression to get the text between /* and */:

(/\* )+(.+)(\*/) This method is good when this only needs to happen once, for example, when the entire string is like

October 18, 2021By Simo Regexp appearance, between, Capture, expressions, letters, problem, regular, Text, time, twoLeave a Comment

Regular expression and wildcard introduction

Wildcards and regular expressions 1. Wild-card patterns are generally used to match file names, which are parsed by the shell, and are generally used for find (file search), ls (directory), cp (Cop

October 18, 2021By Simo Regexp expressions, profile, regular, wildcardLeave a Comment

Regular expressions – Shielding strings in Perl using mask strings

I have a string like’xxox-x’, and I want to block every line in the file as follows:

> x Ignored (or just set to a known value)
> o stay the same
> – is a variable length field that can keep

October 18, 2021By Simo Regexp character string, stringLeave a Comment

Regular expression – how to search for six letters with letters in alphabetical order

I recently created a Perl script to search for words starting with D and E with the following code:

$infile =’words.txt’;
open(IN, $infile);
$count = 0;
while ($word = ) {
chomp($word );
if (

October 18, 2021By Simo Regexp alphabetical order, expression, how to use, letters, regular, search, Six, With, wordsLeave a Comment

Regular expression – regular expression matches two unequal numbers

I want to know how to match two numbers, but they are not the same. So, match 12, but not 11, which would be fine.

What I have now is:
I have to match a string like “P12”, I completed it wit

October 18, 2021By Simo Regexp expressions, matching, not equal, numbers, regular, twoLeave a Comment

Regular expression – how to match two values, not depending on their corresponding position in the string

I am looking for the best way to match two values ​​at the same time.

If both values ​​are in the string, I want to get a true value, But I don’t know the order in which they appear in the st

October 18, 2021By Simo Regexp corresponding, Dependent, expressions, How to match, position, regular, two, valuesLeave a Comment

Regular expression is an unstressed HTML tag

Does anyone have a regular expression to match unclosed HTML tags? For example, the regular expression will match the . and the second , but not the first or first closing tag:

testing Is th

October 18, 2021By Simo Regexp expression, HTML, regular, Tag, unstoppableLeave a Comment

Regular expression – how to determine which alternative items in the Perl regular expression mode?

I have a list of regular expressions (about 10-15) and I need to match some text. Matching them one by one in a loop is too slow. However, I did not write my own state machine To match all regular

October 18, 2021By Simo Regexp alternative, expression, How, item, judgment, match, mode, perl, regularLeave a Comment

Posts navigation

Page 1 Page 2 Page 3 Page 4 … Page 9
Recent Posts
  • Sencha-Touch-2 – Sencha Touch 2, Nested XML Analysis NodeValue
  • Add a separation line and format XML content
  • Is there a norm of simplified XML subsets?
  • Look at it when you write React
  • ReactJS – Present React Redux React-Router App to add the server to the Firebase hosted by the Firebase
Categories
  • Android
  • Apache
  • Apache Kafka
  • Asp
  • Auto-Test
  • Automated Build
  • Aws
  • Bitcoin
  • Browser
  • C & C++
  • C#
  • Centos
  • Cgi
  • Character
  • Cloud Service
  • Cocos2dx
  • Cordova
  • CSS
  • Data Structure
  • Delphi
  • Design Pattern
  • Dojo
  • Dubbo
  • ELK
  • Flex
  • football
  • Game
  • Hadoop
  • Hibernate
  • HTML
  • Hybrid
  • Intel
  • IOS
  • Ipad
  • iPhone
  • Java
  • Javascript
  • Jetty
  • JQuery
  • Jsp
  • Linux
  • Load Balance
  • Lua
  • Macbook
  • Macos
  • Mathematics
  • Micro Services
  • Monitoring
  • Motherboard
  • Mysql
  • Network Hardware
  • Network Marketing
  • Nginx
  • NodeJs
  • Nosql
  • Oracle
  • Os Theory
  • Performance
  • PHP
  • Postgresql
  • Power Designer
  • React
  • Redis
  • Regexp
  • Rom
  • Rss
  • Ruby
  • Search Engines
  • Shell Script
  • Silicon Valley
  • Silverlight
  • Software Design
  • Spring
  • Sql
  • Sqlite
  • Sqlserver
  • Storage
  • Storm
  • Surface
  • SVN
  • Swift
  • System Architecture
  • Tablet
  • Uncategorized
  • Unix
  • Visual Basic
  • Visual Studio
  • Web Crawler
  • WebService
  • Windows
  • Wireless
  • XML
  • ZooKeeper
Archives
  • October 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • September 2020
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
© Simon Technology Blog 2025 • ThemeCountry Powered by WordPress