First of all, please have mercy on me. I am not a noob to programming, but I am about as noob as you can get with regex. That being said, I have a problem.
I've got a string that looks something like this:
And I want to format it so that it looks like this:
I've been trying to figure out 'sed', but for the life of me I can't understand regular expressions.
All I was able to come up with was this:
But that doesn't work at all, and it probably has as many syntax errors as possible.
I realize that it may seem that I'm lazy and just want somebody to do this for me, but I am here to learn!
Hi,
I need some guidance with understanding this Perl script below. I am not the author of the script and the author has not leave any documentation. I supposed it is meant to be 'easy' if you're a Perl or regex guru. I am having problem understanding what regex to use :confused: The script does... (3 Replies)
Hi
In a file I have string in multiple lines. Like below:
<?=test.getObjectName("L", "testTBL","D") ?>
<?=test.getObjectName("L", "testTBL","testDB", "D") ?>
I want to use regex to search for the pattern "<?=test.getObjectName...?>"
If the parenthesis has 3 parameters then return 2nd... (5 Replies)
I am working on Sindhi: a perso-Arabic script and since it shares the Unicode-block with over 400 other languages, quite often the database contains characters which are not wanted: illegal characters.
I have identified the character set of Sindhi which is given below:
For clarity's sake, each... (8 Replies)
Hello,
I have a dictionary which I am building for the Open Source Community. The data structure is as under
HEADWORD=PARTOFSPEECH=ENGLISH MEANING
as shown in the example below
अ=m=Prefix signifying negation.
अँहँ=ind=Interjection expressing disapprobation.
अं=int=An interjection... (2 Replies)
Gurus,
I have a data file which has a certain number of columns say 101. It has one description column which contains foreign characters and due to this some times, those special characters are translated to new line character and resulting in failing the process.
I am using the following awk... (4 Replies)
I am interested in finding a regex to find a word in second position on a line. The word in question is या
I tried the following PERL EXPRESSION but it did not work:
] या
or
^\W या
But both gave Null results
I am giving below a Sample file:
देना या सौंपना=delegate
तह जमना या... (8 Replies)
Hello,
Splitting a sentence using the full-stop/question-mark/exclamation is a common device. Whereas the question-mark / exclamation do not pose too much of a problem; the full-stop as a sentence delimiter raises certain issues because of its varied use:
just to name a few.
Standard parsers... (9 Replies)
Hi the below perl snippet will replace any three letter string in the beginning with a two letter string which is specified..but if i want to modfiy only certain characters for eg..
ABC - AB
CAB - AB
AAA - No Modifcations
1AB - AB
AB8 - AB
Whatever coming before or after of AB only have... (2 Replies)
Hi All,
I have the below scenario in my environment
Developers used to copy file from windows to Linux box. Some time on the copied file developers miss to run the dos2unix utility. Because of this script gets failed during the execution. Most of the failures are due to the dos2unix format... (7 Replies)
Hi, I'm working on gathering information stored in .txt files. The format of the data within the .txt files is shown in the picture uploaded with this post. Sections like the one pictured are repeated (with different data, same format) many times within each .txt file but each section is of data... (4 Replies)