Search
 
SCRIPT & CODE EXAMPLE
 

PERL

perl substitution

# Basic syntax:
$your_string =~ s/regex pattern/text to substitute/;
# Where:
#	- regex pattern is the pattern to search for in $your_string
#	- text to substitute is the replacement text when the pattern is found
# 	- add g after the last slash (/) to replace all matches for each line

# Example usage:
my $dna_sequence = "AACTAGCGGAATTCCGACCGT";
# substitute GAATTC with lowercase
$dna_sequence =~ s/GAATTC/gaattc/;
print "$dna_sequence
";
--> AACTAGCGgaattcCGACCGT
Comment

PREVIOUS NEXT
Code Example
Perl :: perl add to hash 
Perl :: perl print array 
Perl :: perl variables 
Perl :: append string perl 
Perl :: perl 6 
Perl :: perl download images files 
Pascal :: pascal readln() 
Pascal :: pascal while 
Pascal :: pascal special characters 
Powershell :: install python command line windows 
Gdscript :: godot check if object is in group 
Gdscript :: godot 3d slowly rotate towards object 
Abap :: abap data conversion 
Erlang :: get port erlang 
Assembly :: does assembly language use registers 
Assembly :: Z language latex 
Assembly :: vba and 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: list all node processes 
Javascript :: javascript radian to degree 
Javascript :: check react version terminal windows 
Javascript :: jquery only number allowed to 10 digit 
Javascript :: count number of checkboxes in html jquery 
Javascript :: javascript lowercase string 
Javascript :: regex date validation mm/dd/yyyy 
Javascript :: how to console.log formData 
Javascript :: js scroll to id 
Javascript :: sleep for 1 second 
Javascript :: jquery css add important 
Javascript :: dconf-editor install terminal 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =