Basically im trying to come up with a regex which can parse the below strings.
The output should be EC, AB or A.
The strings can have number sometimes like 98, 28.5 and I need to extarct the first 2 characters and if it has a space i should get the first character.
InputString = ("ECX3","ABC3X 98","A B3X 28.5");
$InputString =~ s/(\w |\w+)(\D)(\d)X(\w*|\s*|\d*)$/$1/g;
can some one help.In reply to Regex Question for parsing a string by ganeshm69
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |