Problem I have a BLAST output file and want to calculate query coverage, appending the query lengths as an additional […]
Tag: regex
Wrap string at certain delimiters
Problem The method receives an unformatted string and it needs to put line breaks after ‘;’ or before ‘i)’ and […]
Convert camelCase and PascalCase to Title Case
Problem I’m trying to take camelCase and PascalCase strings into a function and spit them out as Title Case. This […]
Run an external program and extract a pattern match along with the result file
Problem The script takes two input files of protein sequences and runs an external program (installed in linux/MacOS). The result […]
Align text (left, center, right) without additional packages
Problem I wrote this short subroutine to left, center, right-align a multiline string. How can I make it better (shorter, […]
Improve on Regex replacing classnames
Problem I am working on a small script for a mobile site. Is there any way to improve on the […]
Regex to enforce password requirements
Problem I’m trying to write regex to validate the password for the given rule. Passwords must be at least 8 […]
Match all youtube links in a string of text
Problem I’m looking to pull all the youtube links from a string of text and was wondering how does this […]
Check if string is palindrome LeetCode
Problem LeetCode 125 requires receiving a string and checking if it is a valid palindrome. I have done this and […]
Parsing annotation
Problem I have implemented code for parsing annotation: /** * @Route(path=”sample n test”,code,value,boolean,test) * @access(code=false) * @sample as asdad asd […]