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

Tag: perl

Regular expression – strings in the single click using Perl

My opinion:

my $tmp = “rrccllrrc”; Expected output :

$tmp = “right right center center left left right right center”; #End should not be spaced definitely. My code:< /p>

$tmp=~s/c

October 18, 2021By Simo Regexp click, expression, in the string, perl, regular, REPLACE, usageLeave 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

Regular expression – Assess postal code input to Perl array

I have an array containing the first 2 characters of the postal code area in Perl, as shown below:

@acceptedPostcodes = (“CV”, “LE”, “CM”, “CB”, “EN”, “SG”, “NN”, “MK”, ​​”LU”, “PE”, “ST”, ”

October 18, 2021By Simo Regexp Arrse, evaluation, expression, input, perl, Postal Code, regularLeave a Comment

Regular expression – replacing characters in Perl

I am trying to double all the vowels in each word. For example:

$string=”if it rains, cover with umbrella”; This is the code I wrote, but I did not get the correct output.

$string=~s/a

October 18, 2021By Simo Regexp character, expression, middle, perl, regular, replacementLeave a Comment

Regular expression – overlapping text replacement using Perl regular expression

I have a text file containing a bunch of sentences. The sentences contain spaces (spaces, tabs, new lines) to separate words composed of letters and/or numbers.
I want to find the word “123” or “

October 18, 2021By Simo Regexp expressions, overlap, perl, regular, replacement, Text, useLeave a Comment

Regular expression – delete comments using Perl

Is there any regular expression that can remove all comments in a given C program // and / ** / var from perl?

Given a multi-line program, it should use regular expressions to remove comments

October 18, 2021By Simo Regexp Comment, delete, expressions, perl, regular, useLeave a Comment

Regular expression – Perl if statement confusion

This code is an if statement; I want to test whether $rtgene contains trn.
I tested the code with $rtgene = nad3:

if ($rtgene!~/trn/){
$end=$data[$i][0]+100;
}
else{< br />$end =$data[$i][1]

October 17, 2021By Simo Regexp confusion, expression, perl, regular, statementLeave a Comment

Performance – When I use a thread, why will my Perl script slowly decompress the file?

So I run perl 5.10 on core 2 duo macbook pro compiled with thread support: usethreads = define, useithreads = define. I have a simple script to read 4 gzip files , Each file contains 750,000 lines.

October 2, 2021By Simo Performance decompression, file, my, Perform, perl, Script, slow, thread, time, use, why, willLeave a Comment
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